feat: 优化选区编辑+修复部分bug
This commit is contained in:
@@ -320,7 +320,7 @@ export class CreateTextCommand extends Command {
|
||||
this.y = options.y;
|
||||
this.textOptions = options.textOptions || {};
|
||||
// 生成唯一ID
|
||||
this.textId = options?.textId || this.generateId("text_");
|
||||
this.textId = options?.textId || generateId("text_");
|
||||
this.layerId = options?.layerId || generateId("text_layer_");
|
||||
|
||||
// 生成的对象和图层信息
|
||||
@@ -526,14 +526,6 @@ export class CreateTextCommand extends Command {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成唯一ID
|
||||
* @returns {String} 唯一ID
|
||||
*/
|
||||
generateId() {
|
||||
return `text_${Date.now()}_${Math.floor(Math.random() * 1000)}`;
|
||||
}
|
||||
|
||||
getInfo() {
|
||||
return {
|
||||
name: this.name,
|
||||
|
||||
Reference in New Issue
Block a user