1
This commit is contained in:
@@ -47,6 +47,14 @@ export class RectToolManager {
|
||||
if(height === 0) height = 50
|
||||
this.demoObject.set({ width, height })
|
||||
const object = this.demoObject.toJSON("evented")
|
||||
if(object.width < 0) {
|
||||
object.left += object.width
|
||||
object.width = -object.width
|
||||
}
|
||||
if(object.height < 0) {
|
||||
object.top += object.height
|
||||
object.height = -object.height
|
||||
}
|
||||
this.layerManager.createRectLayer(object, true)
|
||||
this.canvasManager.canvas.remove(this.demoObject)
|
||||
this.canvasManager.canvas.renderAll()
|
||||
|
||||
Reference in New Issue
Block a user