mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Merge 95ced4a30c
into 21b8bdd0f3
This commit is contained in:
commit
6b725bfc98
11340
package-lock.json
generated
Normal file
11340
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -11,6 +11,11 @@
|
||||
this.toolId = 'tool-dithering';
|
||||
this.helpText = 'Dithering tool';
|
||||
this.shortcut = pskl.service.keyboard.Shortcuts.TOOL.DITHERING;
|
||||
|
||||
this.tooltipDescriptors = [
|
||||
{key : 'ctrl', description : 'Use 25% dither'},
|
||||
{key : 'shift', description : 'Use 75% dither'},
|
||||
];
|
||||
};
|
||||
|
||||
pskl.utils.inherit(ns.DitheringTool, ns.SimplePen);
|
||||
@ -36,6 +41,12 @@
|
||||
ns.DitheringTool.prototype.applyToolOnPixel = function(col, row, frame, overlay, event) {
|
||||
var usePrimaryColor = (col + row) % 2;
|
||||
|
||||
if (pskl.utils.UserAgent.isMac ? event.metaKey : event.ctrlKey) {
|
||||
usePrimaryColor = col % 2 || row % 2;
|
||||
} else if (event.shiftKey) {
|
||||
usePrimaryColor = col % 2 && row % 2;
|
||||
}
|
||||
|
||||
if (pskl.app.mouseStateService.isRightButtonPressed()) {
|
||||
usePrimaryColor = !usePrimaryColor;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user