Skip to content

Commit

Permalink
0.17.6-8, 2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zsviczian committed Oct 28, 2024
1 parent ac6350c commit b3f2c8a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 4 additions & 3 deletions packages/excalidraw/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5991,8 +5991,7 @@ class App extends React.Component<AppProps, AppState> {
isHoldingSpace ||
isPanning ||
isDraggingScrollBar ||
isHandToolActive(this.state) ||
isTouchInPenMode(this.state, event) //zsviczian (single finger panning in pen mode)
isHandToolActive(this.state)
) {
return;
}
Expand Down Expand Up @@ -9911,7 +9910,9 @@ class App extends React.Component<AppProps, AppState> {
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);
Expand Down
5 changes: 4 additions & 1 deletion packages/excalidraw/obsidianUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,11 @@ export async function fetchFontFromVault(url: string | URL): Promise<ArrayBuffer

//zsviczian (single finger panning in pen mode)
export function isTouchInPenMode(appState: AppState, event: React.PointerEvent<HTMLElement> | 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);
}
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.6-7",
"version": "0.17.6-8",
"main": "main.js",
"types": "types/excalidraw/index.d.ts",
"files": [
Expand Down

0 comments on commit b3f2c8a

Please sign in to comment.