|
|
|
|
@@ -279,7 +279,7 @@ export class LayerManager {
|
|
|
|
|
})
|
|
|
|
|
this.setLayerPosition(rectObject, options)
|
|
|
|
|
await this.canvasManager.add(rectObject, isRecord)
|
|
|
|
|
if (isActive) this.setActiveID(rectObject.info.id)
|
|
|
|
|
if (isActive) this.setActiveID(rectObject.info.id, false)
|
|
|
|
|
return rectObject
|
|
|
|
|
}
|
|
|
|
|
/** 创建直线图层 */
|
|
|
|
|
@@ -303,7 +303,7 @@ export class LayerManager {
|
|
|
|
|
});
|
|
|
|
|
this.setLayerPosition(arrowObject, options)
|
|
|
|
|
await this.canvasManager.add(arrowObject, isRecord)
|
|
|
|
|
if (isActive) this.setActiveID(arrowObject.info.id)
|
|
|
|
|
if (isActive) this.setActiveID(arrowObject.info.id, false)
|
|
|
|
|
return arrowObject
|
|
|
|
|
}
|
|
|
|
|
/** 创建椭圆图层 */
|
|
|
|
|
@@ -320,7 +320,7 @@ export class LayerManager {
|
|
|
|
|
})
|
|
|
|
|
this.setLayerPosition(ellipseObject, options)
|
|
|
|
|
await this.canvasManager.add(ellipseObject)
|
|
|
|
|
if (isActive) this.setActiveID(ellipseObject.info.id)
|
|
|
|
|
if (isActive) this.setActiveID(ellipseObject.info.id, false)
|
|
|
|
|
return ellipseObject
|
|
|
|
|
}
|
|
|
|
|
/** 创建三角形图层 */
|
|
|
|
|
@@ -339,7 +339,7 @@ export class LayerManager {
|
|
|
|
|
})
|
|
|
|
|
this.setLayerPosition(triangleObject, options)
|
|
|
|
|
await this.canvasManager.add(triangleObject, isRecord)
|
|
|
|
|
if (isActive) this.setActiveID(triangleObject.info.id)
|
|
|
|
|
if (isActive) this.setActiveID(triangleObject.info.id, false)
|
|
|
|
|
return triangleObject
|
|
|
|
|
}
|
|
|
|
|
/** 创建五角星图层 */
|
|
|
|
|
@@ -360,7 +360,7 @@ export class LayerManager {
|
|
|
|
|
})
|
|
|
|
|
this.setLayerPosition(starObject, options)
|
|
|
|
|
await this.canvasManager.add(starObject, isRecord)
|
|
|
|
|
if (isActive) this.setActiveID(starObject.info.id)
|
|
|
|
|
if (isActive) this.setActiveID(starObject.info.id, false)
|
|
|
|
|
return starObject
|
|
|
|
|
}
|
|
|
|
|
/** 创建箭头图层 */
|
|
|
|
|
@@ -384,7 +384,7 @@ export class LayerManager {
|
|
|
|
|
});
|
|
|
|
|
this.setLayerPosition(arrowObject, options)
|
|
|
|
|
await this.canvasManager.add(arrowObject, isRecord)
|
|
|
|
|
if (isActive) this.setActiveID(arrowObject.info.id)
|
|
|
|
|
if (isActive) this.setActiveID(arrowObject.info.id, false)
|
|
|
|
|
return arrowObject
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|