mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
feature : add keyboard shortcuts
+ cleanup of color management + colors are now stored in palette controller + drawing controller has a dependency on palette controller + UPDATE COLOR events have been removed (they were used only for synchronizing palette and drawing controller)
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
};
|
||||
|
||||
pskl.utils.inherit(ns.ColorPicker, ns.BaseTool);
|
||||
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
@@ -20,9 +20,9 @@
|
||||
if (frame.containsPixel(col, row)) {
|
||||
var sampledColor = frame.getPixel(col, row);
|
||||
if (context.button == Constants.LEFT_BUTTON) {
|
||||
$.publish(Events.PRIMARY_COLOR_SELECTED, [sampledColor]);
|
||||
$.publish(Events.SELECT_PRIMARY_COLOR, [sampledColor]);
|
||||
} else if (context.button == Constants.RIGHT_BUTTON) {
|
||||
$.publish(Events.SECONDARY_COLOR_SELECTED, [sampledColor]);
|
||||
$.publish(Events.SELECT_SECONDARY_COLOR, [sampledColor]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user