mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 06:07:11 -05:00
* 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
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
import * as tr from "@tslib/ftl";
|
|
|
|
import {
|
|
mdiCursorDefaultOutline,
|
|
mdiEllipseOutline,
|
|
mdiRectangleOutline,
|
|
mdiTextBox,
|
|
mdiVectorPolygonVariant,
|
|
} from "../icons";
|
|
import {
|
|
cursorKeyCombination,
|
|
ellipseKeyCombination,
|
|
polygonKeyCombination,
|
|
rectangleKeyCombination,
|
|
textKeyCombination,
|
|
} from "./shortcuts";
|
|
|
|
export const tools = [
|
|
{
|
|
id: "cursor",
|
|
icon: mdiCursorDefaultOutline,
|
|
tooltip: tr.editingImageOcclusionSelectTool,
|
|
shortcut: cursorKeyCombination,
|
|
},
|
|
{
|
|
id: "draw-rectangle",
|
|
icon: mdiRectangleOutline,
|
|
tooltip: tr.editingImageOcclusionRectangleTool,
|
|
shortcut: rectangleKeyCombination,
|
|
},
|
|
{
|
|
id: "draw-ellipse",
|
|
icon: mdiEllipseOutline,
|
|
tooltip: tr.editingImageOcclusionEllipseTool,
|
|
shortcut: ellipseKeyCombination,
|
|
},
|
|
{
|
|
id: "draw-polygon",
|
|
icon: mdiVectorPolygonVariant,
|
|
tooltip: tr.editingImageOcclusionPolygonTool,
|
|
shortcut: polygonKeyCombination,
|
|
},
|
|
{
|
|
id: "draw-text",
|
|
icon: mdiTextBox,
|
|
tooltip: tr.editingImageOcclusionTextTool,
|
|
shortcut: textKeyCombination,
|
|
},
|
|
];
|