diff --git a/client/web/src/components/panels/Document.vue b/client/web/src/components/panels/Document.vue index 46cdf9dd..38f17d61 100644 --- a/client/web/src/components/panels/Document.vue +++ b/client/web/src/components/panels/Document.vue @@ -34,11 +34,7 @@ - - - - - +

View Mode

More view mode options will be here

@@ -228,7 +224,7 @@ import PersistentScrollbar, { ScrollbarDirection } from "@/components/widgets/sc import CanvasRuler, { RulerDirection } from "@/components/widgets/rulers/CanvasRuler.vue"; import IconButton from "@/components/widgets/buttons/IconButton.vue"; import PopoverButton from "@/components/widgets/buttons/PopoverButton.vue"; -import RadioInput from "@/components/widgets/inputs/RadioInput.vue"; +import RadioInput, { RadioEntries } from "@/components/widgets/inputs/RadioInput.vue"; import NumberInput, { IncrementDirection } from "@/components/widgets/inputs/NumberInput.vue"; import DropdownInput from "@/components/widgets/inputs/DropdownInput.vue"; import OptionalInput from "@/components/widgets/inputs/OptionalInput.vue"; @@ -238,10 +234,15 @@ import { SectionsOfMenuListEntries } from "@/components/widgets/floating-menus/M const documentModeEntries: SectionsOfMenuListEntries = [ [ { label: "Design Mode", icon: "ViewportDesignMode" }, - { label: "Select Mode", icon: "ViewportSelectMode" }, - { label: "Guide Mode", icon: "ViewportGuideMode" }, + { label: "Select Mode", icon: "ViewportSelectMode", action: () => comingSoon(330) }, + { label: "Guide Mode", icon: "ViewportGuideMode", action: () => comingSoon(331) }, ], ]; +const viewModeEntries: RadioEntries = [ + { value: "normal", icon: "ViewModeNormal", tooltip: "View Mode: Normal" }, + { value: "outline", icon: "ViewModeOutline", tooltip: "View Mode: Outline", action: () => comingSoon(319) }, + { value: "pixels", icon: "ViewModePixels", tooltip: "View Mode: Pixels", action: () => comingSoon(320) }, +]; const wasm = import("@/../wasm/pkg"); @@ -294,12 +295,6 @@ export default defineComponent({ const { select_tool } = await wasm; select_tool(toolName); }, - async viewModeChanged(toolIndex: number) { - function todo(_: number) { - return _; - } - todo(toolIndex); - }, async swapWorkingColors() { const { swap_colors } = await wasm; swap_colors(); @@ -361,6 +356,7 @@ export default defineComponent({ canvasSvgHeight: "100%", activeTool: "Select", documentModeEntries, + viewModeEntries, documentModeSelectionIndex: 0, viewModeIndex: 0, snappingEnabled: true, diff --git a/client/web/src/components/widgets/floating-menus/MenuList.vue b/client/web/src/components/widgets/floating-menus/MenuList.vue index cb1e5857..d6ed94e5 100644 --- a/client/web/src/components/widgets/floating-menus/MenuList.vue +++ b/client/web/src/components/widgets/floating-menus/MenuList.vue @@ -183,7 +183,8 @@ const MenuList = defineComponent({ if (menuEntry.action) menuEntry.action(); else if (this.defaultAction) this.defaultAction(); - else this.$emit("update:activeEntry", menuEntry); + + this.$emit("update:activeEntry", menuEntry); }, handleEntryMouseEnter(menuEntry: MenuListEntry) { if (!menuEntry.children || !menuEntry.children.length) return; diff --git a/client/web/src/components/widgets/inputs/RadioInput.vue b/client/web/src/components/widgets/inputs/RadioInput.vue index 1cbe8748..065fd474 100644 --- a/client/web/src/components/widgets/inputs/RadioInput.vue +++ b/client/web/src/components/widgets/inputs/RadioInput.vue @@ -1,89 +1,99 @@