We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If you create a Box with isCentered: true option and then adjust the width or height the Box is repositions itself as if isCentered was false.
isCentered: true
width
height
isCentered
false
In order to preserve the isCentered property of the box you currently need to do the following:
const box = new Box({ x: 10, y: 10 }, 5, 5, { isCentered: true }) box.width = 8 box.height = 8 // extra hack to preserve isCentered property const centroid = box.getCentroidWithoutRotation() const x = centroid.x * (box.isCentered ? 1 : -1) const y = centroid.y * (box.isCentered ? 1 : -1) box.translate(-x, -y)
The text was updated successfully, but these errors were encountered:
@joeynenni thank you very much for this bug report
I will check this and fix in upcoming days
thank you <3
Sorry, something went wrong.
fix: issue #70
0e2b7de
fixed in ^9.4.1 thanks
^9.4.1
I tested the fix and it works great, thank you!
No branches or pull requests
If you create a Box with
isCentered: true
option and then adjust thewidth
orheight
the Box is repositions itself as ifisCentered
wasfalse
.In order to preserve the
isCentered
property of the box you currently need to do the following:The text was updated successfully, but these errors were encountered: