You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Konva architecture allows multiple shapes to have the same name. This is sort of like HTML class names. https://konvajs.org/docs/selectors/Select_by_Name.html
but id is unique. and I think Konva guarantees that. so for your use case it would be:
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:
and access that through
console.log(rect.node.name())
, or change the name throughrect.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 addand duplicate take the name of the original, and postfix
-copy
, e.g,triangle
totriangle-copy
.Two shapes can have the same name however...
The text was updated successfully, but these errors were encountered: