fix: build errors
This commit is contained in:
parent
9bbd57299d
commit
0babefa30b
|
|
@ -7,8 +7,6 @@ import { computeAllLayouts } from '#core/layout'
|
|||
import type { SceneNode } from '#core/scene-graph'
|
||||
import type { Vector } from '#core/types'
|
||||
|
||||
import {useI18n} from "@open-pencil/vue";
|
||||
|
||||
import { createClipboardCopyActions } from './clipboard/copy'
|
||||
import { createClipboardExportActions } from './clipboard/export'
|
||||
import { createClipboardFontActions } from './clipboard/fonts'
|
||||
|
|
@ -27,7 +25,6 @@ type PasteOptions = {
|
|||
|
||||
export function createClipboardActions(ctx: EditorContext) {
|
||||
function duplicateSelected(selectedNodes: SceneNode[]) {
|
||||
const {panels} = useI18n();
|
||||
const prevSelection = new Set(ctx.state.selectedIds)
|
||||
const selectedSet = new Set(selectedNodes.map((n) => n.id))
|
||||
const topLevel = selectedNodes.filter((n) => !n.parentId || !selectedSet.has(n.parentId))
|
||||
|
|
@ -38,7 +35,7 @@ export function createClipboardActions(ctx: EditorContext) {
|
|||
for (const node of topLevel) {
|
||||
const parentId = node.parentId ?? ctx.state.currentPageId
|
||||
const clone = ctx.graph.cloneTree(node.id, parentId, {
|
||||
name: node.name + panels.value.nodeCopyString || ' copy',
|
||||
name: node.name + ' copy',
|
||||
x: node.x + 20,
|
||||
y: node.y + 20
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
import { CANVAS_BG_COLOR } from '#core/constants'
|
||||
import type { EditorState } from '#core/editor/types'
|
||||
import { useI18n } from "@open-pencil/vue"
|
||||
|
||||
export function createDefaultEditorState(pageId: string): EditorState {
|
||||
const { panels } = useI18n();
|
||||
return {
|
||||
activeTool: 'SELECT',
|
||||
currentPageId: pageId,
|
||||
|
|
@ -20,7 +18,7 @@ export function createDefaultEditorState(pageId: string): EditorState {
|
|||
penCursorY: null,
|
||||
remoteCursors: [],
|
||||
autoLayoutHover: null,
|
||||
documentName: panels.value.untitled || 'Untitled',
|
||||
documentName: 'Untitled',
|
||||
panX: 0,
|
||||
pageColor: { ...CANVAS_BG_COLOR },
|
||||
panY: 0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue