paper-swatch-picker icon indicating copy to clipboard operation
paper-swatch-picker copied to clipboard

the color attribute dosent work... There is a fix I do...

Open davecourtois opened this issue 2 years ago • 0 comments

The icon color dosent change...

In the file paper-swatch-picker

at line 193 in the attched handler... I add verification if color attribute exist if so I fire the event...

attached: function() { // Note: we won't actually render these color boxes unless the menu is // actually tapped. this._renderedColors = false; if(this.getAttribute("color")!=null){ this.color = this.getAttribute("color") this.fire('color-picker-selected', {color: this.color}); }

this._updateSize();

},

at line 275 I set the property of --iron-icon-fill-color

_colorChanged: function() {

this.$.iconButton.style.color = this.color;
this.$.iconButton.style.setProperty("--iron-icon-fill-color", this.color)

},

Now the icon is the correct color

Browsers Affected

  • [ ] Chrome
  • [ ] Firefox
  • [ ] Safari 9
  • [ ] Safari 8
  • [ ] Safari 7
  • [ ] Edge
  • [ ] IE 11
  • [ ] IE 10

davecourtois avatar Apr 26 '22 13:04 davecourtois