mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fixed regression on color-picker
This commit is contained in:
parent
1c12e92ce3
commit
0a2e2217c9
@ -53,10 +53,10 @@ pskl.Palette = (function() {
|
|||||||
var onPaletteColorClick_ = function (event) {
|
var onPaletteColorClick_ = function (event) {
|
||||||
var selectedColor = $(event.target).data("color");
|
var selectedColor = $(event.target).data("color");
|
||||||
if (event.which == 1) { // left button
|
if (event.which == 1) { // left button
|
||||||
updateColorPicker(selectedColor, $('#color-picker')[0]);
|
updateColorPicker(selectedColor, $('#color-picker'));
|
||||||
$.publish(Events.COLOR_SELECTED, [selectedColor, true]);
|
$.publish(Events.COLOR_SELECTED, [selectedColor, true]);
|
||||||
} else if (event.which == 3) { // right button
|
} else if (event.which == 3) { // right button
|
||||||
updateColorPicker(selectedColor, $('#secondary-color-picker')[0]);
|
updateColorPicker(selectedColor, $('#secondary-color-picker'));
|
||||||
$.publish(Events.COLOR_SELECTED, [selectedColor, false]);
|
$.publish(Events.COLOR_SELECTED, [selectedColor, false]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -72,10 +72,10 @@ pskl.Palette = (function() {
|
|||||||
// The colorpicker can't be set to a transparent state.
|
// The colorpicker can't be set to a transparent state.
|
||||||
// We set its background to white and insert the
|
// We set its background to white and insert the
|
||||||
// string "TRANSPARENT" to mimic this state:
|
// string "TRANSPARENT" to mimic this state:
|
||||||
colorPicker.color.fromString("#fff");
|
colorPicker[0].color.fromString("#fff");
|
||||||
colorPicker.val(Constants.TRANSPARENT_COLOR);
|
colorPicker.val(Constants.TRANSPARENT_COLOR);
|
||||||
} else {
|
} else {
|
||||||
colorPicker.color.fromString(color);
|
colorPicker[0].color.fromString(color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user