Skip to content

Commit

Permalink
version": "0.17.1-obsidian-40, 2.4.0-beta-6
Browse files Browse the repository at this point in the history
  • Loading branch information
zsviczian committed Aug 14, 2024
1 parent 9df4e75 commit 3d39c52
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/excalidraw/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ import { LaserTrails } from "../laser-trails";
import { withBatchedUpdates, withBatchedUpdatesThrottled } from "../reactUtils";
import { getRenderOpacity } from "../renderer/renderElement";
import {
allowDoubleTapEraser,
getExcalidrawContentEl,
hideFreedrawPenmodeCursor,
hostPlugin,
Expand Down Expand Up @@ -5556,6 +5557,7 @@ class App extends React.Component<AppProps, AppState> {
if (
//zsviczian - double click eraser
this.state.penMode &&
allowDoubleTapEraser() &&
this.lastPointerDownEvent?.pointerType === "touch" &&
this.state.activeTool.type !== "selection"
) {
Expand Down
4 changes: 4 additions & 0 deletions packages/excalidraw/obsidianUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export function getWidthHeightLimit() {
return hostPlugin.excalidrawConfig.widthHeightLimit ?? 32767;
}

export function allowDoubleTapEraser() {
return hostPlugin.settings.penModeDoubleTapEraser;
}

export function isExcaliBrainView() {
const excalidrawView = hostPlugin.activeExcalidrawView;
if (!excalidrawView) {
Expand Down
2 changes: 1 addition & 1 deletion packages/excalidraw/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zsviczian/excalidraw",
"version": "0.17.1-obsidian-39",
"version": "0.17.1-obsidian-40",
"main": "main.js",
"types": "types/excalidraw/index.d.ts",
"files": [
Expand Down

0 comments on commit 3d39c52

Please sign in to comment.