Browse Source

enhance: enter edit mode when creating shapes

Konstantinos Kaloutas 2 năm trước cách đây
mục cha
commit
4c7597af11

+ 3 - 1
tldraw/packages/core/src/lib/tools/TLBoxTool/states/CreatingState.tsx

@@ -87,8 +87,10 @@ export class CreatingState<
     this.tool.transition('idle')
     if (this.creatingShape) {
       this.app.setSelectedShapes([this.creatingShape as unknown as S])
+      this.app.api.editShape(this.creatingShape)
+    } else {
+      this.app.transition('select')
     }
-    this.app.transition('select')
     this.app.persist()
   }