-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationquestionFurther information is requestedFurther information is requested
Description
I know we have discussed this is #24. But I feel that we should have default names for each shape created.
In #24 you had suggested that we should pass the name such as:
const rect = editor.shapes.rect.insert({
name: '<name>',
// rest config
})
and access that through console.log(rect.node.name())
, or change the name through rect.node.name('<new name>')
I feel that this leaves room for bugs, due to missing this in Pikaso's documentation.
I suggest we add a method renameShape()
and add
public insert(config: Konva.ArrowConfig): ArrowModel {
return super.insert({
name: `${type}`
...config
})
}
and duplicate take the name of the original, and postfix -copy
, e.g, triangle
to triangle-copy
.
Two shapes can have the same name however...
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationquestionFurther information is requestedFurther information is requested