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:
parent
1888d7f8a3
commit
1c6fd1fb1a
1 changed files with 11 additions and 0 deletions
|
@ -155,12 +155,23 @@ const maskBrushTool = () =>
|
||||||
uiCtx.fill();
|
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) => {
|
state.wheelcb = (evn) => {
|
||||||
if (!evn.evn.ctrlKey) {
|
if (!evn.evn.ctrlKey) {
|
||||||
state.brushSize = state.setBrushSize(
|
state.brushSize = state.setBrushSize(
|
||||||
state.brushSize -
|
state.brushSize -
|
||||||
Math.floor(state.config.brushScrollSpeed * evn.delta)
|
Math.floor(state.config.brushScrollSpeed * evn.delta)
|
||||||
);
|
);
|
||||||
|
state.redraw();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue