深度画布多语言
This commit is contained in:
@@ -4,6 +4,8 @@ import { createId } from '../../tools/tools'
|
||||
import { exportObjectsToImage, exportObjectToThumbnail } from '../tools/exportMethod'
|
||||
import { OperationType, BlendMode } from '../tools/layerHelper'
|
||||
import { getArrowPath, getLinePath, cloneObjects, getStarArr } from '../tools/canvasMethod'
|
||||
import i18n from '@/lang/index'
|
||||
const t = i18n.global.t
|
||||
|
||||
export class LayerManager {
|
||||
stateManager: any
|
||||
@@ -206,7 +208,7 @@ export class LayerManager {
|
||||
fill: 'transparent',
|
||||
info: {
|
||||
id: createId("image"),
|
||||
name: '空图层',
|
||||
name: t('DepthCanvas.emptyLayer'),
|
||||
}
|
||||
})
|
||||
this.setLayerPosition(emptyObject)
|
||||
@@ -226,7 +228,7 @@ export class LayerManager {
|
||||
evented: false,
|
||||
info: {
|
||||
id: createId("group"),
|
||||
name: '智能选区组',
|
||||
name: t('DepthCanvas.aiGroupLayer'),
|
||||
showChildren: true,
|
||||
...(options?.info || {}),
|
||||
}
|
||||
@@ -245,7 +247,7 @@ export class LayerManager {
|
||||
...(options || {}),
|
||||
info: {
|
||||
id: createId("text"),
|
||||
name: '文本图层',
|
||||
name: t('DepthCanvas.textLayer'),
|
||||
...(options?.info || {}),
|
||||
}
|
||||
})
|
||||
@@ -263,7 +265,7 @@ export class LayerManager {
|
||||
...(options || {}),
|
||||
info: {
|
||||
id: createId("rect"),
|
||||
name: '矩形图层',
|
||||
name: t('DepthCanvas.rectLayer'),
|
||||
...(options?.info || {}),
|
||||
}
|
||||
})
|
||||
@@ -287,7 +289,7 @@ export class LayerManager {
|
||||
...(options || {}),
|
||||
info: {
|
||||
id: createId("line"),
|
||||
name: '直线图层',
|
||||
name: t('DepthCanvas.lineLayer'),
|
||||
...(options?.info || {}),
|
||||
}
|
||||
});
|
||||
@@ -304,7 +306,7 @@ export class LayerManager {
|
||||
...(options || {}),
|
||||
info: {
|
||||
id: createId("ellipse"),
|
||||
name: '椭圆图层',
|
||||
name: t('DepthCanvas.ellipseLayer'),
|
||||
...(options?.info || {}),
|
||||
}
|
||||
})
|
||||
@@ -323,7 +325,7 @@ export class LayerManager {
|
||||
...(options || {}),
|
||||
info: {
|
||||
id: createId("triangle"),
|
||||
name: '三角形图层',
|
||||
name: t('DepthCanvas.triangleLayer'),
|
||||
...(options?.info || {}),
|
||||
}
|
||||
})
|
||||
@@ -343,7 +345,7 @@ export class LayerManager {
|
||||
...(options || {}),
|
||||
info: {
|
||||
id: createId("star"),
|
||||
name: '五角星图层',
|
||||
name: t('DepthCanvas.starLayer'),
|
||||
...(options?.info || {}),
|
||||
}
|
||||
})
|
||||
@@ -367,7 +369,7 @@ export class LayerManager {
|
||||
...(options || {}),
|
||||
info: {
|
||||
id: createId("arrow"),
|
||||
name: '箭头图层',
|
||||
name: t('DepthCanvas.arrowLayer'),
|
||||
...(options?.info || {}),
|
||||
}
|
||||
});
|
||||
@@ -397,7 +399,7 @@ export class LayerManager {
|
||||
...(options || {}),
|
||||
info: {
|
||||
id: createId("image"),
|
||||
name: "图片图层",
|
||||
name: t('DepthCanvas.imageLayer'),
|
||||
...(options?.info || {}),
|
||||
}
|
||||
})
|
||||
@@ -421,7 +423,7 @@ export class LayerManager {
|
||||
info: {
|
||||
...(targetLayer?.info || {}),
|
||||
id: createId("image"),
|
||||
name: targetLayer?.info?.name || "合并图层",
|
||||
name: targetLayer?.info?.name || t('DepthCanvas.mergeLayer'),
|
||||
}
|
||||
})
|
||||
resolve(img)
|
||||
|
||||
Reference in New Issue
Block a user