-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shape: Default name of shape #34
Labels
Comments
Konva architecture allows multiple shapes to have the same name. This is sort of like HTML class names. const rect = editor.shapes.rect.insert({
})
console.log(rect.node.id()) |
raminious
added
question
Further information is requested
and removed
feature request
New feature request
labels
Oct 16, 2021
@raminious I think the best way to approach this is explicitly have it in the pikaso documentation, like how to pass the default name. I get you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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: