diff --git a/manifest-beta.json b/manifest-beta.json
index d5bca44..a930519 100644
--- a/manifest-beta.json
+++ b/manifest-beta.json
@@ -1,7 +1,7 @@
{
"id": "obsidian-excalidraw-plugin",
"name": "Excalidraw",
- "version": "2.10.0",
+ "version": "2.10.1",
"minAppVersion": "1.1.6",
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
"author": "Zsolt Viczian",
diff --git a/manifest.json b/manifest.json
index a374542..4db45ed 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,7 +1,7 @@
{
"id": "obsidian-excalidraw-plugin",
"name": "Excalidraw",
- "version": "2.10.0",
+ "version": "2.10.1",
"minAppVersion": "1.1.6",
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
"author": "Zsolt Viczian",
diff --git a/package.json b/package.json
index 5a7a39b..03bb9ce 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,7 @@
"license": "MIT",
"dependencies": {
"@popperjs/core": "^2.11.8",
- "@zsviczian/excalidraw": "0.18.0-6",
+ "@zsviczian/excalidraw": "0.18.0-7",
"chroma-js": "^2.4.2",
"clsx": "^2.0.0",
"@zsviczian/colormaster": "^1.2.2",
diff --git a/src/core/settings.ts b/src/core/settings.ts
index c7a774a..3752513 100644
--- a/src/core/settings.ts
+++ b/src/core/settings.ts
@@ -380,6 +380,7 @@ export const DEFAULT_SETTINGS: ExcalidrawSettings = {
DYNAMIC_COLOR: true,
COLOR: "#000000",
OPACITY: 50,
+ GRID_DIRECTION: {horizontal: true, vertical: true},
},
laserSettings: {
DECAY_LENGTH: 50,
@@ -1380,6 +1381,42 @@ export class ExcalidrawSettingTab extends PluginSettingTab {
getExcalidrawViews(this.app).forEach(excalidrawView=>excalidrawView.updateGridColor());
};
+ const updateGridDirection = () => {
+ getExcalidrawViews(this.app).forEach(excalidrawView=>
+ excalidrawView.updateGridDirection(this.plugin.settings.gridSettings.GRID_DIRECTION));
+ }
+
+ new Setting(detailsEl)
+ .setName(t("GRID_DIRECTION_NAME"))
+ .setDesc(t("GRID_DIRECTION_DESC"))
+ .addToggle((toggle) =>
+ toggle
+ .setTooltip(t("GRID_HORIZONTAL"))
+ .setValue(this.plugin.settings.gridSettings.GRID_DIRECTION?.horizontal ?? true)
+ .onChange((value) => {
+ if(!this.plugin.settings.gridSettings.GRID_DIRECTION) {
+ this.plugin.settings.gridSettings.GRID_DIRECTION = { horizontal: true, vertical: true };
+ } //2.10.1 migration
+ this.plugin.settings.gridSettings.GRID_DIRECTION.horizontal = value;
+ this.applySettingsUpdate();
+ updateGridDirection();
+ }),
+ )
+ .addToggle((toggle) =>
+ toggle
+ .setTooltip(t("GRID_VERTICAL"))
+ .setValue(this.plugin.settings.gridSettings.GRID_DIRECTION?.vertical ?? true)
+ .onChange((value) => {
+ if(!this.plugin.settings.gridSettings.GRID_DIRECTION) {
+ this.plugin.settings.gridSettings.GRID_DIRECTION = { horizontal: true, vertical: true };
+ } //2.10.1 migration
+ this.plugin.settings.gridSettings.GRID_DIRECTION.vertical = value;
+ this.applySettingsUpdate();
+ updateGridDirection();
+ }),
+ );
+
+
// Dynamic color toggle
let gridColorSection: HTMLDivElement;
new Setting(detailsEl)
diff --git a/src/lang/locale/en.ts b/src/lang/locale/en.ts
index 2e3f776..d8ca1e9 100644
--- a/src/lang/locale/en.ts
+++ b/src/lang/locale/en.ts
@@ -427,6 +427,10 @@ FILENAME_HEAD: "Filename",
GRID_OPACITY_NAME: "Grid opacity",
GRID_OPACITY_DESC: "Grid opacity will also control the opacity of the binding box when binding an arrow to an element.
" +
"Set the opacity of the grid. 0 is transparent, 100 is opaque.",
+ GRID_DIRECTION_NAME: "Grid direction",
+ GRID_DIRECTION_DESC: "The first toggle shows/hides the horizontal grid, the second toggle shows/hides the vertical grid.",
+ GRID_HORIZONTAL: "Render horizontal grid",
+ GRID_VERTICAL: "Render vertical grid",
LASER_HEAD: "Laser pointer",
LASER_COLOR: "Laser pointer color",
LASER_DECAY_TIME_NAME: "Laser pointer decay time",
diff --git a/src/shared/Dialogs/Messages.ts b/src/shared/Dialogs/Messages.ts
index f41f1cb..c38c1e4 100644
--- a/src/shared/Dialogs/Messages.ts
+++ b/src/shared/Dialogs/Messages.ts
@@ -11,12 +11,32 @@ Thank you & Enjoy!
`;
export const RELEASE_NOTES: { [k: string]: string } = {
- Intro: `After each update you'll be prompted with the release notes. You can disable this in plugin settings.
+ Intro: `After each update, you’ll see these release notes (you can turn this off in the plugin settings).
-I develop this plugin as a hobby, spending my free time doing this. If you find it valuable, then please say THANK YOU or...
+I build this plugin in my free time, as a labor of love. Curious about the philosophy behind it? Check out [📕 Sketch Your Mind](https://sketch-your-mind.com). If you find it valuable, say THANK YOU or…