Merge pull request #72 from zero01101/bleeding-edge

fix maskbrush stationary cursor wheel rendering
This commit is contained in:
Victor Seiji Hariki 2022-12-06 22:09:18 -03:00 committed by GitHub
commit ea4226e877
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,12 +155,23 @@ const maskBrushTool = () =>
uiCtx.fill();
};
state.redraw = () => {
state.movecb({
...mouse.coords.world.pos,
evn: {
clientX: mouse.coords.window.pos.x,
clientY: mouse.coords.window.pos.y,
},
});
};
state.wheelcb = (evn) => {
if (!evn.evn.ctrlKey) {
state.brushSize = state.setBrushSize(
state.brushSize -
Math.floor(state.config.brushScrollSpeed * evn.delta)
);
state.redraw();
}
};