feat: support props.locked
for setActiveTool
(#7153)
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
This commit is contained in:
@ -3249,7 +3249,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||
});
|
||||
|
||||
setActiveTool = (
|
||||
tool:
|
||||
tool: (
|
||||
| (
|
||||
| { type: Exclude<ToolType, "image"> }
|
||||
| {
|
||||
@ -3257,7 +3257,8 @@ class App extends React.Component<AppProps, AppState> {
|
||||
insertOnCanvasDirectly?: boolean;
|
||||
}
|
||||
)
|
||||
| { type: "custom"; customType: string },
|
||||
| { type: "custom"; customType: string }
|
||||
) & { locked?: boolean },
|
||||
) => {
|
||||
const nextActiveTool = updateActiveTool(this.state, tool);
|
||||
if (nextActiveTool.type === "hand") {
|
||||
@ -4714,7 +4715,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||
pointerDownState,
|
||||
);
|
||||
} else if (this.state.activeTool.type === "custom") {
|
||||
setCursor(this.interactiveCanvas, CURSOR_TYPE.AUTO);
|
||||
setCursorForShape(this.interactiveCanvas, this.state);
|
||||
} else if (this.state.activeTool.type === "frame") {
|
||||
this.createFrameElementOnPointerDown(pointerDownState);
|
||||
} else if (this.state.activeTool.type === "laser") {
|
||||
|
Reference in New Issue
Block a user