This commit is contained in:
lzp
2026-03-30 17:11:33 +08:00
parent 8a88e0dd1d
commit 2fb33c638e

View File

@@ -174,8 +174,10 @@ export class CanvasManager {
if (!activeID) return if (!activeID) return
const activeObject = this.getObjectById(activeID) const activeObject = this.getObjectById(activeID)
if (!activeObject) return if (!activeObject) return
const parentId = activeObject.info?.parentId if (object.type !== "group") {
if (!object.info.parentId) object.info.parentId = parentId const parentId = activeObject.info?.parentId
if (!object.info.parentId) object.info.parentId = parentId
}
const index = this.getObjects().indexOf(activeObject) const index = this.getObjects().indexOf(activeObject)
this.canvas.moveTo(object, index + 1) this.canvas.moveTo(object, index + 1)
// await this.sortObjectByIds(ids, isRecord) // await this.sortObjectByIds(ids, isRecord)