diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx index 272b4d1411d6..e5d576fb580f 100644 --- a/packages/excalidraw/components/App.tsx +++ b/packages/excalidraw/components/App.tsx @@ -5991,8 +5991,7 @@ class App extends React.Component { isHoldingSpace || isPanning || isDraggingScrollBar || - isHandToolActive(this.state) || - isTouchInPenMode(this.state, event) //zsviczian (single finger panning in pen mode) + isHandToolActive(this.state) ) { return; } @@ -9911,7 +9910,9 @@ class App extends React.Component { created: Date.now(), lastRetrieved: Date.now(), //@ts-ignore - name: imageFile?.name, // zsviczian + name: (imageFile?.name && imageFile.name !== "image.png") + ? imageFile.name + : undefined, // zsviczian }, }; const cachedImageData = this.imageCache.get(fileId); diff --git a/packages/excalidraw/obsidianUtils.ts b/packages/excalidraw/obsidianUtils.ts index 3044e98a23c2..13e5cbbc2ca4 100644 --- a/packages/excalidraw/obsidianUtils.ts +++ b/packages/excalidraw/obsidianUtils.ts @@ -151,8 +151,11 @@ export async function fetchFontFromVault(url: string | URL): Promise | MouseEvent) { + if(!hostPlugin.settings.penModeSingleFingerPanning) { + return false; + } const isReactPointerEvent = 'nativeEvent' in event; return appState.penMode && (!isReactPointerEvent || (event.pointerType !== "pen")) && - !["laser", "selection", "eraser", "hand"].includes(appState.activeTool.type); + ![ "text" ].includes(appState.activeTool.type); } \ No newline at end of file diff --git a/packages/excalidraw/package.json b/packages/excalidraw/package.json index adfd5afb8b63..963f58f56241 100644 --- a/packages/excalidraw/package.json +++ b/packages/excalidraw/package.json @@ -1,6 +1,6 @@ { "name": "@zsviczian/excalidraw", - "version": "0.17.6-7", + "version": "0.17.6-8", "main": "main.js", "types": "types/excalidraw/index.d.ts", "files": [