|  | @@ -214,6 +214,7 @@ import {
 | 
											
												
													
														|  |    withBatchedUpdates,
 |  |    withBatchedUpdates,
 | 
											
												
													
														|  |    wrapEvent,
 |  |    wrapEvent,
 | 
											
												
													
														|  |    withBatchedUpdatesThrottled,
 |  |    withBatchedUpdatesThrottled,
 | 
											
												
													
														|  | 
 |  | +  setEraserCursor,
 | 
											
												
													
														|  |  } from "../utils";
 |  |  } from "../utils";
 | 
											
												
													
														|  |  import ContextMenu, { ContextMenuOption } from "./ContextMenu";
 |  |  import ContextMenu, { ContextMenuOption } from "./ContextMenu";
 | 
											
												
													
														|  |  import LayerUI from "./LayerUI";
 |  |  import LayerUI from "./LayerUI";
 | 
											
										
											
												
													
														|  | @@ -1051,6 +1052,9 @@ class App extends React.Component<AppProps, AppState> {
 | 
											
												
													
														|  |      ) {
 |  |      ) {
 | 
											
												
													
														|  |        this.setState({ elementType: "selection" });
 |  |        this.setState({ elementType: "selection" });
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  | 
 |  | +    if (prevState.theme !== this.state.theme) {
 | 
											
												
													
														|  | 
 |  | +      setEraserCursor(this.canvas, this.state.theme);
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  |      // Hide hyperlink popup if shown when element type is not selection
 |  |      // Hide hyperlink popup if shown when element type is not selection
 | 
											
												
													
														|  |      if (
 |  |      if (
 | 
											
												
													
														|  |        prevState.elementType === "selection" &&
 |  |        prevState.elementType === "selection" &&
 | 
											
										
											
												
													
														|  | @@ -1873,7 +1877,7 @@ class App extends React.Component<AppProps, AppState> {
 | 
											
												
													
														|  |        } else if (this.state.elementType === "selection") {
 |  |        } else if (this.state.elementType === "selection") {
 | 
											
												
													
														|  |          resetCursor(this.canvas);
 |  |          resetCursor(this.canvas);
 | 
											
												
													
														|  |        } else {
 |  |        } else {
 | 
											
												
													
														|  | -        setCursorForShape(this.canvas, this.state.elementType);
 |  | 
 | 
											
												
													
														|  | 
 |  | +        setCursorForShape(this.canvas, this.state);
 | 
											
												
													
														|  |          this.setState({
 |  |          this.setState({
 | 
											
												
													
														|  |            selectedElementIds: {},
 |  |            selectedElementIds: {},
 | 
											
												
													
														|  |            selectedGroupIds: {},
 |  |            selectedGroupIds: {},
 | 
											
										
											
												
													
														|  | @@ -1899,7 +1903,7 @@ class App extends React.Component<AppProps, AppState> {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    private selectShapeTool(elementType: AppState["elementType"]) {
 |  |    private selectShapeTool(elementType: AppState["elementType"]) {
 | 
											
												
													
														|  |      if (!isHoldingSpace) {
 |  |      if (!isHoldingSpace) {
 | 
											
												
													
														|  | -      setCursorForShape(this.canvas, elementType);
 |  | 
 | 
											
												
													
														|  | 
 |  | +      setCursorForShape(this.canvas, this.state);
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |      if (isToolIcon(document.activeElement)) {
 |  |      if (isToolIcon(document.activeElement)) {
 | 
											
												
													
														|  |        this.focusContainer();
 |  |        this.focusContainer();
 | 
											
										
											
												
													
														|  | @@ -2043,7 +2047,7 @@ class App extends React.Component<AppProps, AppState> {
 | 
											
												
													
														|  |            editingElement: null,
 |  |            editingElement: null,
 | 
											
												
													
														|  |          });
 |  |          });
 | 
											
												
													
														|  |          if (this.state.elementLocked) {
 |  |          if (this.state.elementLocked) {
 | 
											
												
													
														|  | -          setCursorForShape(this.canvas, this.state.elementType);
 |  | 
 | 
											
												
													
														|  | 
 |  | +          setCursorForShape(this.canvas, this.state);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          this.focusContainer();
 |  |          this.focusContainer();
 | 
											
										
											
												
													
														|  | @@ -2525,7 +2529,7 @@ class App extends React.Component<AppProps, AppState> {
 | 
											
												
													
														|  |        if (isOverScrollBar) {
 |  |        if (isOverScrollBar) {
 | 
											
												
													
														|  |          resetCursor(this.canvas);
 |  |          resetCursor(this.canvas);
 | 
											
												
													
														|  |        } else {
 |  |        } else {
 | 
											
												
													
														|  | -        setCursorForShape(this.canvas, this.state.elementType);
 |  | 
 | 
											
												
													
														|  | 
 |  | +        setCursorForShape(this.canvas, this.state);
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -2575,7 +2579,7 @@ class App extends React.Component<AppProps, AppState> {
 | 
											
												
													
														|  |        const { points, lastCommittedPoint } = multiElement;
 |  |        const { points, lastCommittedPoint } = multiElement;
 | 
											
												
													
														|  |        const lastPoint = points[points.length - 1];
 |  |        const lastPoint = points[points.length - 1];
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -      setCursorForShape(this.canvas, this.state.elementType);
 |  | 
 | 
											
												
													
														|  | 
 |  | +      setCursorForShape(this.canvas, this.state);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        if (lastPoint === lastCommittedPoint) {
 |  |        if (lastPoint === lastCommittedPoint) {
 | 
											
												
													
														|  |          // if we haven't yet created a temp point and we're beyond commit-zone
 |  |          // if we haven't yet created a temp point and we're beyond commit-zone
 | 
											
										
											
												
													
														|  | @@ -2689,7 +2693,9 @@ class App extends React.Component<AppProps, AppState> {
 | 
											
												
													
														|  |        scenePointer,
 |  |        scenePointer,
 | 
											
												
													
														|  |        hitElement,
 |  |        hitElement,
 | 
											
												
													
														|  |      );
 |  |      );
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +    if (isEraserActive(this.state)) {
 | 
											
												
													
														|  | 
 |  | +      return;
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  |      if (
 |  |      if (
 | 
											
												
													
														|  |        this.hitLinkElement &&
 |  |        this.hitLinkElement &&
 | 
											
												
													
														|  |        !this.state.selectedElementIds[this.hitLinkElement.id]
 |  |        !this.state.selectedElementIds[this.hitLinkElement.id]
 | 
											
										
											
												
													
														|  | @@ -2706,8 +2712,6 @@ class App extends React.Component<AppProps, AppState> {
 | 
											
												
													
														|  |          !this.state.showHyperlinkPopup
 |  |          !this.state.showHyperlinkPopup
 | 
											
												
													
														|  |        ) {
 |  |        ) {
 | 
											
												
													
														|  |          this.setState({ showHyperlinkPopup: "info" });
 |  |          this.setState({ showHyperlinkPopup: "info" });
 | 
											
												
													
														|  | -      } else if (isEraserActive(this.state)) {
 |  | 
 | 
											
												
													
														|  | -        setCursor(this.canvas, CURSOR_TYPE.AUTO);
 |  | 
 | 
											
												
													
														|  |        } else if (this.state.elementType === "text") {
 |  |        } else if (this.state.elementType === "text") {
 | 
											
												
													
														|  |          setCursor(
 |  |          setCursor(
 | 
											
												
													
														|  |            this.canvas,
 |  |            this.canvas,
 | 
											
										
											
												
													
														|  | @@ -2998,8 +3002,6 @@ class App extends React.Component<AppProps, AppState> {
 | 
											
												
													
														|  |          hitElement,
 |  |          hitElement,
 | 
											
												
													
														|  |        );
 |  |        );
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  | -    if (isEraserActive(this.state)) {
 |  | 
 | 
											
												
													
														|  | -    }
 |  | 
 | 
											
												
													
														|  |      if (
 |  |      if (
 | 
											
												
													
														|  |        this.hitLinkElement &&
 |  |        this.hitLinkElement &&
 | 
											
												
													
														|  |        !this.state.selectedElementIds[this.hitLinkElement.id]
 |  |        !this.state.selectedElementIds[this.hitLinkElement.id]
 | 
											
										
											
												
													
														|  | @@ -3128,7 +3130,7 @@ class App extends React.Component<AppProps, AppState> {
 | 
											
												
													
														|  |            if (this.state.viewModeEnabled) {
 |  |            if (this.state.viewModeEnabled) {
 | 
											
												
													
														|  |              setCursor(this.canvas, CURSOR_TYPE.GRAB);
 |  |              setCursor(this.canvas, CURSOR_TYPE.GRAB);
 | 
											
												
													
														|  |            } else {
 |  |            } else {
 | 
											
												
													
														|  | -            setCursorForShape(this.canvas, this.state.elementType);
 |  | 
 | 
											
												
													
														|  | 
 |  | +            setCursorForShape(this.canvas, this.state);
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |          this.setState({
 |  |          this.setState({
 | 
											
										
											
												
													
														|  | @@ -3253,7 +3255,7 @@ class App extends React.Component<AppProps, AppState> {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      const onPointerUp = withBatchedUpdates(() => {
 |  |      const onPointerUp = withBatchedUpdates(() => {
 | 
											
												
													
														|  |        isDraggingScrollBar = false;
 |  |        isDraggingScrollBar = false;
 | 
											
												
													
														|  | -      setCursorForShape(this.canvas, this.state.elementType);
 |  | 
 | 
											
												
													
														|  | 
 |  | +      setCursorForShape(this.canvas, this.state);
 | 
											
												
													
														|  |        lastPointerUp = null;
 |  |        lastPointerUp = null;
 | 
											
												
													
														|  |        this.setState({
 |  |        this.setState({
 | 
											
												
													
														|  |          cursorButton: "up",
 |  |          cursorButton: "up",
 |