-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
feat(LayoutManager): BREAKING remove shouldResetTransform
logic from layoutManager
#9581
Conversation
Build Stats
|
d614e5b
to
c4c4b44
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleanup is done
now decisions
src/shapes/ActiveSelection.ts
Outdated
*/ | ||
onDeselect() { | ||
this.removeAll(); | ||
resetObjectTransform(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want this?
I have noticed that we introduced a regression with polys flagged with exactBoundingBox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed resetting transform, ready to go
shouldResetTransform
shouldResetTransform
Let's take a moment to recap layout manager! Can we also define what the layout manager does? I have seen discussion about trying to use it to re-organize the objects inside the group but i never reviewed the code looking for that kind of feature, so i have no idea if is possible and if something. |
We can bind, sure. You want it in this PR?
position of the children, size of the group so doing stuff like table or flex layout is part of the scope. So it is possible and the API is pretty solid so hooking into should be relatively straight forward. |
What is the regression? |
* If returns true, deselection is cancelled. | ||
* @since 2.0.0 | ||
* @return {Boolean} [cancel] | ||
* @override remove all objects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why removing the comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the jsdoc concats the comments of the super method so there is no need, it is spam
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is bad, because if i m just reading the codebase i can't concat anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if you hover with your mouse?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah VSCODE does this, i m just not sure how it is supposed to be by the JSDOCS logic
We can make another pr for the binding issue |
I should open a ticket.
|
So can we merge? |
|
||
const context: StrictLayoutContext = { | ||
bubbles: true, | ||
strategy: manager.strategy, | ||
target, | ||
targets: [rect], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The layoutManager.getLayoutResult is not using targets at all, it is using target.getObjects().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm
that is maybe something to discuss
targets are objects that changed (I think it is used only for subscribing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding or removing this line doesn't do anything else than helping TS, is also a bit confusing in the test definition that one test 'LAYOUT_TYPE_INITIALIZATION ' pass empty targets to override this one here while 'LAYOUT_TYPE_IMPERATIVE' doesn't.
Also on my vscode both '[]' and '[rect]' give a red error in typescript.
I will investigate this typing issue right after merging, i don't think a function that doesn't use 'targets' should requires it in the typings
shouldResetTransform
shouldResetTransform
logic from layoutManager
Description
Thanks to #9561 it is now possible to remove the badly designed
shouldResetTransform
hook from the layout manager, me to blame.Thanks for the patience!
In Action