2
0
mirror of https://github.com/PitPik/tinyColorPicker synced 2025-06-28 05:31:07 -06:00

tiny optimization

This commit is contained in:
peterd 2015-03-31 13:00:45 +02:00
parent 5d98d3fc09
commit 987ede3684
3 changed files with 9 additions and 7 deletions

View File

@ -112,15 +112,17 @@
$(_html).css({'margin': _options.margin}).
appendTo('body').
show(0, function() {
_GPU = _options.GPU && $(this).css('perspective') !== undefined;
var $this = $(this);
_GPU = _options.GPU && $this.css('perspective') !== undefined;
_$xy_slider = $('.cp-xy-slider', this);
_$xy_cursor = $('.cp-xy-cursor', this);
_$z_cursor = $('.cp-z-cursor', this);
_$alpha = $('.cp-alpha', this).toggle(!!_options.opacity);
_$alpha_cursor = $('.cp-alpha-cursor', this);
_options.buildCallback.call(_colorPicker, $(this));
$(this).prepend('<div>').children().eq(0).css('width',
$(this).children().eq(0).width() // stabilizer
_options.buildCallback.call(_colorPicker, $this);
$this.prepend('<div>').children().eq(0).css('width',
$this.children().eq(0).width() // stabilizer
);
this._width = this.offsetWidth;
this._height = this.offsetHeight;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long