pull/67/merge
M. Saiqul Haq 8 years ago committed by GitHub
commit 3cf9b66ce5

@ -31,7 +31,7 @@
Colors = function(options) { Colors = function(options) {
this.colors = {RND: {}}; this.colors = {RND: {}};
this.options = { this.options = {
color: 'rgba(0,0,0,0)', // init value(s)... color: options.color || 'rgba(0,0,0,0)', // init value(s)...
grey: grey, grey: grey,
luminance: luminance, luminance: luminance,
valueRanges: _valueRanges valueRanges: _valueRanges

@ -272,7 +272,7 @@
animationSpeed: 150, animationSpeed: 150,
GPU: true, GPU: true,
doRender: true, doRender: true,
customBG: '#FFF', customBG: $(this).css('background-color') || '#FFF',
opacity: true, opacity: true,
renderCallback: noop, renderCallback: noop,
buildCallback: noop, buildCallback: noop,
@ -304,6 +304,8 @@
.add(_instance.filter(e.target))[0] && toggle(); .add(_instance.filter(e.target))[0] && toggle();
}); });
var customBG = options.customBG;
return this.on('focusin.tcp click.tcp', function(event) { return this.on('focusin.tcp click.tcp', function(event) {
_colorPicker.color.options = // swap options to fake new instance _colorPicker.color.options = // swap options to fake new instance
$.extend(_colorPicker.color.options, _options = _this.options); $.extend(_colorPicker.color.options, _options = _this.options);
@ -314,7 +316,7 @@
_this.colorPicker.render(true); _this.colorPicker.render(true);
}) })
.each(function() { .each(function() {
var value = extractValue(this), var value = customBG || extractValue(this),
mode = value.split('('), mode = value.split('('),
$elm = findElement($(this)); $elm = findElement($(this));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save