12345上山打老虎
This commit is contained in:
@@ -136,10 +136,11 @@ export class LayerManager {
|
||||
copyLayerById(id) {
|
||||
const object = this.canvasManager.getObjectById(id)
|
||||
if (!object) return console.warn('复制图层失败,对象不存在ID:', id)
|
||||
this.canvasManager.discardActiveObject()
|
||||
cloneObjects([object]).then(objects => {
|
||||
const newObject = objects[0]
|
||||
const info = JSON.parse(JSON.stringify(newObject.info))
|
||||
info.id = createId("image")
|
||||
info.id = createId("copylayer")
|
||||
// info.name = info.name
|
||||
newObject.set({
|
||||
top: newObject.top + 15,
|
||||
|
||||
Reference in New Issue
Block a user