-
Notifications
You must be signed in to change notification settings - Fork 465
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
Refactor Figure sizing logic #982
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
martinRenou
changed the title
Refactor Figure sizing logic
WIP: Refactor Figure sizing logic
Dec 4, 2019
This does ignore the min/max aspect ratio btw. |
Yes, we need to discuss this :) That is the exact reason for the WIP |
martinRenou
force-pushed
the
sizing_refactor
branch
from
December 16, 2019 15:50
d44de7f
to
2c4578a
Compare
martinRenou
changed the title
WIP: Refactor Figure sizing logic
Refactor Figure sizing logic
Dec 16, 2019
@maartenbreddels @SylvainCorlay I think this is good to go! It now respects the min/max aspect ratio and it is signed off :) edit: and TypeScripted |
martinRenou
force-pushed
the
sizing_refactor
branch
from
December 16, 2019 15:54
2c4578a
to
ca917aa
Compare
Signed-off-by: martinRenou <martin.renou@gmail.com>
martinRenou
force-pushed
the
sizing_refactor
branch
from
December 16, 2019 15:58
ca917aa
to
b7f8261
Compare
martinRenou
force-pushed
the
sizing_refactor
branch
from
December 17, 2019 10:52
dafa1e9
to
9350d92
Compare
LGTM, and works. |
SylvainCorlay
approved these changes
Dec 18, 2019
Reviewed together. I approve. |
This was referenced Dec 18, 2019
This was referenced Jan 16, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes
Before this change, the Figure was rendered once with a default size of
640x480
beforethis.el
was even attached to the DOM. And there was a resize when the element is actually attached to the page.After the change, the Figure waits for
this.el
to be attached before doing any rendering, and it renders in the available space specified by the CSS rules (width: auto, height: 480 by default). This prevents doing an extra resize, and it prevents the figure to take a first hardcoded size.