Skip to content
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

Allow resizing label similar to "text" shape. #66

Closed
amanver16 opened this issue May 11, 2022 · 3 comments
Closed

Allow resizing label similar to "text" shape. #66

amanver16 opened this issue May 11, 2022 · 3 comments
Assignees
Labels
feature request New feature request
Milestone

Comments

@amanver16
Copy link

This is a feature request to allow users to resize "label" similar to "text". If possible allow to edit "text" as it is already resizable.
More details I have posted in this discussion

@raminious
Copy link
Contributor

raminious commented May 16, 2022

The feature is done will be released with version 2.6.0

The following configuration should be followed to enable resizing from different aspects:

editor.shapes.label.insert({
    container: {/* config */},
    tag: {/* config */},
    text: {/* config */},
    config: {
      keepScale: false|true, // By setting keepScale to false, the default scaling behavior will be disabled
      transformer: {
        keepRatio: true, // keepRatio set to true to maintain scaling when scaling from corners
        enabledAnchors: ['middle-left', 'middle-right', 'bottom-right'] // Here are all the options available https://konvajs.org/api/Konva.Transformer.html#enabledAnchors__anchor
      }
    }
  })

All options for Konva.Transformer are available through transformer

@raminious raminious added the done label May 16, 2022
@raminious
Copy link
Contributor

@raminious raminious removed the done label May 17, 2022
@amanver16
Copy link
Author

I have tested it. Everything works like a charm now.
Thank you so much,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants