fix maskbrush stationary cursor wheel rendering

brush did not redraw when changing brush size. now it does

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
Victor Seiji Hariki 2022-12-06 22:06:30 -03:00
parent 1888d7f8a3
commit 1c6fd1fb1a

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();
}
};