mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
parent
8e828f2955
commit
aab81f9f9a
7 changed files with 60 additions and 0 deletions
|
@ -70,6 +70,29 @@ editing-from-clipboard = From Clipboard
|
||||||
editing-alignment = Alignment
|
editing-alignment = Alignment
|
||||||
editing-equations = Equations
|
editing-equations = Equations
|
||||||
editing-no-image-found-on-clipboard = No image found on clipboard.
|
editing-no-image-found-on-clipboard = No image found on clipboard.
|
||||||
|
editing-image-occlusion-mode = Image Occlusion Mode
|
||||||
|
editing-image-occlusion-zoom-out = Zoom Out
|
||||||
|
editing-image-occlusion-zoom-in = Zoom In
|
||||||
|
editing-image-occlusion-zoom-reset = Reset Zoom
|
||||||
|
editing-image-occlusion-toggle-translucent = Toggle Translucency
|
||||||
|
editing-image-occlusion-delete = Delete
|
||||||
|
editing-image-occlusion-duplicate = Duplicate
|
||||||
|
editing-image-occlusion-group = Group Selection
|
||||||
|
editing-image-occlusion-ungroup = Ungroup Selection
|
||||||
|
editing-image-occlusion-alignment = Alignment
|
||||||
|
editing-image-occlusion-align-left = Align Left
|
||||||
|
editing-image-occlusion-align-h-center = Center horizontally
|
||||||
|
editing-image-occlusion-align-right = Align Right
|
||||||
|
editing-image-occlusion-align-top = Align Top
|
||||||
|
editing-image-occlusion-align-v-center = Center Vertically
|
||||||
|
editing-image-occlusion-align-bottom = Align Bottom
|
||||||
|
editing-image-occlusion-select-tool = Select
|
||||||
|
editing-image-occlusion-zoom-tool = Zoom
|
||||||
|
editing-image-occlusion-rectangle-tool = Rectangle
|
||||||
|
editing-image-occlusion-ellipse-tool = Ellipse
|
||||||
|
editing-image-occlusion-polygon-tool = Polygon
|
||||||
|
editing-image-occlusion-text-tool = Text
|
||||||
|
|
||||||
|
|
||||||
## You don't need to translate these strings, as they will be replaced with different ones soon.
|
## You don't need to translate these strings, as they will be replaced with different ones soon.
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ export const editorModules = [
|
||||||
ModuleName.BROWSING,
|
ModuleName.BROWSING,
|
||||||
ModuleName.NOTETYPES,
|
ModuleName.NOTETYPES,
|
||||||
ModuleName.IMPORTING,
|
ModuleName.IMPORTING,
|
||||||
|
ModuleName.UNDO,
|
||||||
];
|
];
|
||||||
|
|
||||||
export const components = {
|
export const components = {
|
||||||
|
|
|
@ -84,6 +84,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<IconButton
|
<IconButton
|
||||||
class="tool-icon-button {activeTool == tool.id ? 'active-tool' : ''}"
|
class="tool-icon-button {activeTool == tool.id ? 'active-tool' : ''}"
|
||||||
{iconSize}
|
{iconSize}
|
||||||
|
tooltip={tool.tooltip()}
|
||||||
active={activeTool === tool.id}
|
active={activeTool === tool.id}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
activeTool = tool.id;
|
activeTool = tool.id;
|
||||||
|
@ -104,6 +105,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<IconButton
|
<IconButton
|
||||||
class="top-tool-icon-button right-border-radius dropdown-tool-mode"
|
class="top-tool-icon-button right-border-radius dropdown-tool-mode"
|
||||||
slot="reference"
|
slot="reference"
|
||||||
|
tooltip={tr.editingImageOcclusionMode()}
|
||||||
{iconSize}
|
{iconSize}
|
||||||
on:click={() => (showFloating = !showFloating)}
|
on:click={() => (showFloating = !showFloating)}
|
||||||
>
|
>
|
||||||
|
@ -135,6 +137,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
: 'right-border-radius'}"
|
: 'right-border-radius'}"
|
||||||
{iconSize}
|
{iconSize}
|
||||||
on:click={tool.action}
|
on:click={tool.action}
|
||||||
|
tooltip={tool.tooltip()}
|
||||||
disabled={tool.name === "undo"
|
disabled={tool.name === "undo"
|
||||||
? !$undoStack.undoable
|
? !$undoStack.undoable
|
||||||
: !$undoStack.redoable}
|
: !$undoStack.redoable}
|
||||||
|
@ -152,6 +155,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
? 'left-border-radius'
|
? 'left-border-radius'
|
||||||
: ''} {tool.name === 'zoomReset' ? 'right-border-radius' : ''}"
|
: ''} {tool.name === 'zoomReset' ? 'right-border-radius' : ''}"
|
||||||
{iconSize}
|
{iconSize}
|
||||||
|
tooltip={tool.tooltip()}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
tool.action(instance);
|
tool.action(instance);
|
||||||
}}
|
}}
|
||||||
|
@ -166,6 +170,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<IconButton
|
<IconButton
|
||||||
class="top-tool-icon-button left-border-radius"
|
class="top-tool-icon-button left-border-radius"
|
||||||
{iconSize}
|
{iconSize}
|
||||||
|
tooltip={tr.editingImageOcclusionToggleTranslucent()}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
maksOpacity = !maksOpacity;
|
maksOpacity = !maksOpacity;
|
||||||
makeMaskTransparent(canvas, maksOpacity);
|
makeMaskTransparent(canvas, maksOpacity);
|
||||||
|
@ -181,6 +186,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
? 'right-border-radius'
|
? 'right-border-radius'
|
||||||
: ''}"
|
: ''}"
|
||||||
{iconSize}
|
{iconSize}
|
||||||
|
tooltip={tool.tooltip()}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
tool.action(canvas);
|
tool.action(canvas);
|
||||||
}}
|
}}
|
||||||
|
@ -198,6 +204,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
? 'left-border-radius'
|
? 'left-border-radius'
|
||||||
: ''}"
|
: ''}"
|
||||||
{iconSize}
|
{iconSize}
|
||||||
|
tooltip={tool.tooltip()}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
tool.action(canvas);
|
tool.action(canvas);
|
||||||
emitChangeSignal();
|
emitChangeSignal();
|
||||||
|
@ -210,6 +217,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<IconButton
|
<IconButton
|
||||||
class="top-tool-icon-button dropdown-tool right-border-radius"
|
class="top-tool-icon-button dropdown-tool right-border-radius"
|
||||||
{iconSize}
|
{iconSize}
|
||||||
|
tooltip={tr.editingImageOcclusionAlignment()}
|
||||||
on:click={(e) => {
|
on:click={(e) => {
|
||||||
showAlignTools = !showAlignTools;
|
showAlignTools = !showAlignTools;
|
||||||
leftPos = e.pageX - 100;
|
leftPos = e.pageX - 100;
|
||||||
|
@ -225,6 +233,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<IconButton
|
<IconButton
|
||||||
class="top-tool-icon-button"
|
class="top-tool-icon-button"
|
||||||
{iconSize}
|
{iconSize}
|
||||||
|
tooltip={alignTool.tooltip()}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
alignTool.action(canvas);
|
alignTool.action(canvas);
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -17,6 +17,7 @@ const i18n = setupI18n({
|
||||||
ModuleName.NOTETYPES,
|
ModuleName.NOTETYPES,
|
||||||
ModuleName.ACTIONS,
|
ModuleName.ACTIONS,
|
||||||
ModuleName.BROWSING,
|
ModuleName.BROWSING,
|
||||||
|
ModuleName.UNDO,
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
// Copyright: Ankitects Pty Ltd and contributors
|
// Copyright: Ankitects Pty Ltd and contributors
|
||||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
|
import * as tr from "@tslib/ftl";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
mdiAlignHorizontalCenter,
|
mdiAlignHorizontalCenter,
|
||||||
mdiAlignHorizontalLeft,
|
mdiAlignHorizontalLeft,
|
||||||
|
@ -31,11 +33,13 @@ export const groupUngroupTools = [
|
||||||
name: "group",
|
name: "group",
|
||||||
icon: mdiGroup,
|
icon: mdiGroup,
|
||||||
action: groupShapes,
|
action: groupShapes,
|
||||||
|
tooltip: tr.editingImageOcclusionGroup,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ungroup",
|
name: "ungroup",
|
||||||
icon: mdiUngroup,
|
icon: mdiUngroup,
|
||||||
action: unGroupShapes,
|
action: unGroupShapes,
|
||||||
|
tooltip: tr.editingImageOcclusionUngroup,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -44,11 +48,13 @@ export const deleteDuplicateTools = [
|
||||||
name: "delete",
|
name: "delete",
|
||||||
icon: mdiDeleteOutline,
|
icon: mdiDeleteOutline,
|
||||||
action: deleteItem,
|
action: deleteItem,
|
||||||
|
tooltip: tr.editingImageOcclusionDelete,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "duplicate",
|
name: "duplicate",
|
||||||
icon: mdiCopy,
|
icon: mdiCopy,
|
||||||
action: duplicateItem,
|
action: duplicateItem,
|
||||||
|
tooltip: tr.editingImageOcclusionDuplicate,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -57,16 +63,19 @@ export const zoomTools = [
|
||||||
name: "zoomOut",
|
name: "zoomOut",
|
||||||
icon: mdiZoomOut,
|
icon: mdiZoomOut,
|
||||||
action: zoomOut,
|
action: zoomOut,
|
||||||
|
tooltip: tr.editingImageOcclusionZoomOut,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "zoomIn",
|
name: "zoomIn",
|
||||||
icon: mdiZoomIn,
|
icon: mdiZoomIn,
|
||||||
action: zoomIn,
|
action: zoomIn,
|
||||||
|
tooltip: tr.editingImageOcclusionZoomIn,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "zoomReset",
|
name: "zoomReset",
|
||||||
icon: mdiZoomReset,
|
icon: mdiZoomReset,
|
||||||
action: zoomReset,
|
action: zoomReset,
|
||||||
|
tooltip: tr.editingImageOcclusionZoomReset,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -75,30 +84,36 @@ export const alignTools = [
|
||||||
id: 1,
|
id: 1,
|
||||||
icon: mdiAlignHorizontalLeft,
|
icon: mdiAlignHorizontalLeft,
|
||||||
action: alignLeft,
|
action: alignLeft,
|
||||||
|
tooltip: tr.editingImageOcclusionAlignLeft,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
icon: mdiAlignHorizontalCenter,
|
icon: mdiAlignHorizontalCenter,
|
||||||
action: alignHorizontalCenter,
|
action: alignHorizontalCenter,
|
||||||
|
tooltip: tr.editingImageOcclusionAlignVCenter,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
icon: mdiAlignHorizontalRight,
|
icon: mdiAlignHorizontalRight,
|
||||||
action: alignRight,
|
action: alignRight,
|
||||||
|
tooltip: tr.editingImageOcclusionAlignRight,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
icon: mdiAlignVerticalTop,
|
icon: mdiAlignVerticalTop,
|
||||||
action: alignTop,
|
action: alignTop,
|
||||||
|
tooltip: tr.editingImageOcclusionAlignTop,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
icon: mdiAlignVerticalCenter,
|
icon: mdiAlignVerticalCenter,
|
||||||
action: alignVerticalCenter,
|
action: alignVerticalCenter,
|
||||||
|
tooltip: tr.editingImageOcclusionAlignHCenter,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 6,
|
id: 6,
|
||||||
icon: mdiAlignVerticalBottom,
|
icon: mdiAlignVerticalBottom,
|
||||||
action: alignBottom,
|
action: alignBottom,
|
||||||
|
tooltip: tr.editingImageOcclusionAlignBottom,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
// Copyright: Ankitects Pty Ltd and contributors
|
// Copyright: Ankitects Pty Ltd and contributors
|
||||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
|
import * as tr from "@tslib/ftl";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
mdiCursorDefaultOutline,
|
mdiCursorDefaultOutline,
|
||||||
mdiEllipseOutline,
|
mdiEllipseOutline,
|
||||||
|
@ -14,25 +16,31 @@ export const tools = [
|
||||||
{
|
{
|
||||||
id: "cursor",
|
id: "cursor",
|
||||||
icon: mdiCursorDefaultOutline,
|
icon: mdiCursorDefaultOutline,
|
||||||
|
tooltip: tr.editingImageOcclusionSelectTool,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "magnify",
|
id: "magnify",
|
||||||
icon: mdiMagnifyScan,
|
icon: mdiMagnifyScan,
|
||||||
|
tooltip: tr.editingImageOcclusionZoomTool,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "draw-rectangle",
|
id: "draw-rectangle",
|
||||||
icon: mdiRectangleOutline,
|
icon: mdiRectangleOutline,
|
||||||
|
tooltip: tr.editingImageOcclusionRectangleTool,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "draw-ellipse",
|
id: "draw-ellipse",
|
||||||
icon: mdiEllipseOutline,
|
icon: mdiEllipseOutline,
|
||||||
|
tooltip: tr.editingImageOcclusionEllipseTool,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "draw-polygon",
|
id: "draw-polygon",
|
||||||
icon: mdiVectorPolygonVariant,
|
icon: mdiVectorPolygonVariant,
|
||||||
|
tooltip: tr.editingImageOcclusionPolygonTool,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "draw-text",
|
id: "draw-text",
|
||||||
icon: mdiTextBox,
|
icon: mdiTextBox,
|
||||||
|
tooltip: tr.editingImageOcclusionTextTool,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// Copyright: Ankitects Pty Ltd and contributors
|
// Copyright: Ankitects Pty Ltd and contributors
|
||||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
|
import * as tr from "@tslib/ftl";
|
||||||
import type fabric from "fabric";
|
import type fabric from "fabric";
|
||||||
import { writable } from "svelte/store";
|
import { writable } from "svelte/store";
|
||||||
|
|
||||||
|
@ -131,10 +132,12 @@ export const undoRedoTools = [
|
||||||
name: "undo",
|
name: "undo",
|
||||||
icon: mdiUndo,
|
icon: mdiUndo,
|
||||||
action: () => undoStack.undo(),
|
action: () => undoStack.undo(),
|
||||||
|
tooltip: tr.undoUndo,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "redo",
|
name: "redo",
|
||||||
icon: mdiRedo,
|
icon: mdiRedo,
|
||||||
action: () => undoStack.redo(),
|
action: () => undoStack.redo(),
|
||||||
|
tooltip: tr.undoRedo,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue