1 <polymer-element name="viewer-button" attributes="src latchable">
3 <link rel="stylesheet" href="viewer-button.css">
10 Polymer('viewer-button', {
15 var mql = window.matchMedia('(-webkit-min-device-pixel-ratio: 1.3');
16 dpi = mql.matches ? 'hi' : 'low';
19 srcChanged: function() {
21 this.$.icon.style.backgroundImage =
22 'url(elements/viewer-button/img/' + dpi + 'DPI/' + this.src + ')';
24 this.$.icon.style.backgroundImage = '';
27 latchableChanged: function() {
29 this.classList.add('latchable');
31 this.classList.remove('latchable');