Browse Source

Pull request #2599: BI-102974 fix: 不设置RGB直接去色轮点选HSL报错

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit 'c1e14c77508a6e02fedced993c0ee1a1657fc0ca':
  BI-102974 fix: 直接去色轮点选值报错
es6
windy 3 years ago
parent
commit
e042f3a684
  1. 5
      src/case/colorchooser/farbtastic/farbtastic.js

5
src/case/colorchooser/farbtastic/farbtastic.js

@ -16,6 +16,7 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
render: function () {
var self = this;
this._defaultState();
return {
type: "bi.absolute",
items: [{
@ -87,6 +88,10 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
}
},
_defaultState: function () {
this.hsl = [0, 0, 0];
},
_unpack: function (color) {
if (color.length === 7) {
return [parseInt("0x" + color.substring(1, 3)) / 255,

Loading…
Cancel
Save