mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2026-11-27 06:32:42 +00:00
2.17.0-beta-8, 0.18.0-50
This commit is contained in:
1 parent
65ab00a932
commit
ae722623e5
6 files changed
+47
-9
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "obsidian-excalidraw-plugin",
|
||||
"name": "Excalidraw",
|
||||
"version": "2.17.0-beta-7",
|
||||
"version": "2.17.0-beta-8",
|
||||
"minAppVersion": "1.5.7",
|
||||
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
|
||||
"author": "Zsolt Viczian",
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@popperjs/core": "^2.11.8",
|
||||
"@zsviczian/excalidraw": "0.18.0-49",
|
||||
"@zsviczian/excalidraw": "0.18.0-50",
|
||||
"chroma-js": "^3.1.2",
|
||||
"clsx": "^2.0.0",
|
||||
"@zsviczian/colormaster": "^1.2.2",
|
||||
|
||||
@@ -1012,6 +1012,25 @@ export class CommandManager {
|
||||
},
|
||||
});
|
||||
|
||||
this.addCommand({
|
||||
id: "toggle-enable-context-menu",
|
||||
name: t("TOGGLE_ENABLE_CONTEXT_MENU"),
|
||||
checkCallback: (checking: boolean) => {
|
||||
if (checking) {
|
||||
if(DEVICE.isMobile) return false;
|
||||
if(this.app.workspace.getActiveViewOfType(ExcalidrawView)) {
|
||||
const view = this.app.workspace.getActiveViewOfType(ExcalidrawView);
|
||||
const api = view?.excalidrawAPI as ExcalidrawImperativeAPI;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
const view = this.app.workspace.getActiveViewOfType(ExcalidrawView);
|
||||
view.toggleEnableContextMenu();
|
||||
return true;
|
||||
},
|
||||
});
|
||||
|
||||
this.addCommand({
|
||||
id: "flip-image",
|
||||
name: t("FLIP_IMAGE"),
|
||||
|
||||
@@ -110,6 +110,7 @@ export default {
|
||||
TEMPORARY_ENABLE_AUTOSAVE: "Enable autosave",
|
||||
FONTS_LOADED: "Excalidraw: CJK Fonts loaded",
|
||||
FONTS_LOAD_ERROR: "Excalidraw: Could not find CJK Fonts in the assets folder\n",
|
||||
TOGGLE_ENABLE_CONTEXT_MENU: "Toggle enable context menu (helpful on Mobile devices)",
|
||||
|
||||
//Prompt.ts
|
||||
SELECT_LINK_TO_OPEN: "Select a link to open",
|
||||
|
||||
@@ -24,6 +24,7 @@ I build this plugin in my free time, as a labor of love. Curious about the philo
|
||||
- Updated the "Palm Guard" script to support the change UI configurations.
|
||||
- Restructured Mode settings in Excalidraw Settings. You can now set the preference for UI mode for desktop and tablets.
|
||||
The old "prefer tray-mode" toggle has been removed. "Toggle Tray-Mode" changes to "Toggle UI-Mode".
|
||||
- New command palette action: "Toggle enable context menu". This setting is helpful on Mobile devices where the context menu may interfere with touch interactions. The setting is saved with the drawing, thus you can add it to your templates (then press CTRL+S to force save) if you want the context menu to be disabled by default.
|
||||
|
||||
## Fixed
|
||||
- side panel does not attach correctly when library is pinned [#2510](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2510)
|
||||
@@ -32,7 +33,8 @@ I build this plugin in my free time, as a labor of love. Curious about the philo
|
||||
- Fixed duplicated PDF elements after copy-pasting from scene to scene.
|
||||
- Resolved the large gap at the top on iOS devices. As it turns out, Apple adds additional padding automatically to avoid collision with the notch.
|
||||
- Fixed the positioning of the "Canvas and Shape Properties" window.
|
||||
- Attempt to fix the mobile keyboard pop-up distorting the view.
|
||||
- Attempt to fix the mobile keyboard pop-up, distorting the view.
|
||||
- Added finalize multipoint-line button to compact layout
|
||||
`,
|
||||
"2.16.1":`
|
||||
## Fixed
|
||||
|
||||
@@ -1636,21 +1636,26 @@ export default class ExcalidrawView extends TextFileView implements HoverParent{
|
||||
this.registerDomEvent(this.containerEl,"wheel",wheelEvent, {passive: false});
|
||||
|
||||
this.actionButtons = {
|
||||
scriptInstall: this.addAction(SCRIPTENGINE_ICON_NAME, t("INSTALL_SCRIPT_BUTTON"), () => {
|
||||
new ScriptInstallPrompt(this.plugin).open();
|
||||
scriptInstall: this.addAction(
|
||||
SCRIPTENGINE_ICON_NAME,
|
||||
!DEVICE.isMobile ? t("INSTALL_SCRIPT_BUTTON") : "",
|
||||
() => {
|
||||
new ScriptInstallPrompt(this.plugin).open();
|
||||
}),
|
||||
save: this.addAction(
|
||||
DISK_ICON_NAME,
|
||||
t("FORCE_SAVE"),
|
||||
!DEVICE.isMobile ? t("FORCE_SAVE") : "",
|
||||
async () => this.forceSave(),
|
||||
),
|
||||
isRaw: this.addAction(
|
||||
TEXT_DISPLAY_RAW_ICON_NAME,
|
||||
t("RAW"),
|
||||
!DEVICE.isMobile ? t("RAW") : "",
|
||||
() => this.changeTextMode(TextMode.parsed),
|
||||
),
|
||||
link: this.addAction("link", t("OPEN_LINK"), (ev) =>
|
||||
this.handleLinkClick(ev),
|
||||
link: this.addAction(
|
||||
"link",
|
||||
!DEVICE.isMobile ? t("OPEN_LINK") : "",
|
||||
(ev) => this.handleLinkClick(ev),
|
||||
),
|
||||
}
|
||||
/*this.actionButtons['isParsed'] = this.addAction(
|
||||
@@ -3703,6 +3708,7 @@ export default class ExcalidrawView extends TextFileView implements HoverParent{
|
||||
frameRendering: st.frameRendering,
|
||||
objectsSnapModeEnabled: st.objectsSnapModeEnabled,
|
||||
activeTool,
|
||||
disableContextMenu: st.disableContextMenu,
|
||||
},
|
||||
prevTextMode: this.prevTextMode,
|
||||
files,
|
||||
@@ -5856,6 +5862,16 @@ export default class ExcalidrawView extends TextFileView implements HoverParent{
|
||||
});
|
||||
}
|
||||
|
||||
public toggleEnableContextMenu() {
|
||||
(process.env.NODE_ENV === 'development') && DEBUGGING && debug(this.toggleEnableContextMenu, "ExcalidrawView.toggleEnableContextMenu");
|
||||
const api = this.excalidrawAPI as ExcalidrawImperativeAPI;
|
||||
if (!api) {
|
||||
return;
|
||||
}
|
||||
const disableContextMenu = api.getAppState().disableContextMenu;
|
||||
this.updateScene({appState: {disableContextMenu: !disableContextMenu}, captureUpdate: CaptureUpdateAction.NEVER});
|
||||
}
|
||||
|
||||
public setUIMode(mode: UIMode) {
|
||||
(process.env.NODE_ENV === 'development') && DEBUGGING && debug(this.setUIMode, "ExcalidrawView.setDesktopUIMode");
|
||||
const api = this.excalidrawAPI as ExcalidrawImperativeAPI;
|
||||
|
||||
Reference in new issue
Block a user