feat(tools): add brush controls
This commit is contained in:
@@ -103,7 +103,8 @@ export function useCanvasInput(
|
||||
if (brushSession.current) {
|
||||
const activeSessionId = brushSessionId.current;
|
||||
const point = viewportPointToDocumentPoint(inputEvent.position, store.getState().editor.viewport);
|
||||
void updateBrushSession({ store, session: brushSession.current, point }).then((nextSession) => {
|
||||
const settings = store.getState().editor.tools.brush;
|
||||
void updateBrushSession({ store, session: brushSession.current, point, color: settings.color, size: settings.size, hardness: settings.hardness }).then((nextSession) => {
|
||||
if (brushSessionId.current === activeSessionId) brushSession.current = nextSession;
|
||||
});
|
||||
event.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user