Merge pull request #72 from zero01101/bleeding-edge
fix maskbrush stationary cursor wheel rendering
This commit is contained in:
commit
ea4226e877
1 changed files with 11 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue