From 5eafd82521014f8d8550a2a75010908d6f4b73c0 Mon Sep 17 00:00:00 2001 From: Mani <12841290+krmanik@users.noreply.github.com> Date: Sat, 16 Mar 2024 15:05:51 +0800 Subject: [PATCH] fix: ensure proper drawing of shape tools after pan/zoom (#3066) * fix: ensure proper drawing of shape tools after pan/zoom * remove sticky bottom toolbar * make bounding-box not selectable after undo/redo * fix: resize issue, added option to pan using alt/shift + mouse wheel * drag with touchpad * use isDesktop and move globalThis to index.ts * gesture event not required, use preventDefault with passive false in wheel event * use shift in mac and ctrl in pc --- ts/image-occlusion/ImageOcclusionPage.svelte | 10 +--- ts/image-occlusion/Toolbar.svelte | 50 ++++++++++---------- ts/image-occlusion/index.ts | 15 ++++++ ts/image-occlusion/mask-editor.ts | 1 - ts/image-occlusion/tools/lib.ts | 2 + ts/image-occlusion/tools/tool-buttons.ts | 8 ---- ts/image-occlusion/tools/tool-zoom.ts | 42 ++++++++++++---- 7 files changed, 78 insertions(+), 50 deletions(-) diff --git a/ts/image-occlusion/ImageOcclusionPage.svelte b/ts/image-occlusion/ImageOcclusionPage.svelte index 553d1019e..92308419a 100644 --- a/ts/image-occlusion/ImageOcclusionPage.svelte +++ b/ts/image-occlusion/ImageOcclusionPage.svelte @@ -6,19 +6,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import * as tr from "@tslib/ftl"; import Container from "../components/Container.svelte"; - import { addOrUpdateNote } from "./add-or-update-note"; import type { IOMode } from "./lib"; import MasksEditor from "./MaskEditor.svelte"; import Notes from "./Notes.svelte"; - import StickyFooter from "./StickyFooter.svelte"; - import { hideAllGuessOne, textEditingState } from "./store"; + import { textEditingState } from "./store"; export let mode: IOMode; - async function addNote(): Promise { - addOrUpdateNote(mode, $hideAllGuessOne); - } - const items = [ { label: tr.notetypesOcclusionMask(), value: 1 }, { label: tr.notetypesOcclusionNote(), value: 2 }, @@ -51,8 +45,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html - -