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(' + this.getAttribute('assetpath') + 'img/' + dpi +
23 'DPI/' + this.src + ')';
25 this.$.icon.style.backgroundImage = '';
28 latchableChanged: function() {
30 this.classList.add('latchable');
32 this.classList.remove('latchable');