-
Notifications
You must be signed in to change notification settings - Fork 220
Display images without width at natural size #2578
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
base: master
Are you sure you want to change the base?
Display images without width at natural size #2578
Conversation
|
@davidaustinm - if you get a chance, I could use some advice on identifying the image portion of pretext figures. The code as is works with unanotated Prefigure diagrams in the SA, but does not on annotated ones like I can fix that particular case pretty easily, but if you have some advice on the possible locations the svg actually ends up in within the diagram, it might help me avoid similar situations from slipping through the cracks on my initial implementation. No hurries, this is not likely to get Rob's attention for a little bit. |
|
I imagine you're seeing that annotated diagrams appear at roughly 80% of their natural width. This is because they are loaded by the |
|
Thanks @davidaustinm That is helpful. I hadn't gotten to that issue, but I am sure I would have. The difference I was currently focused on is that for an annotated image, the svg data is in: Where as for one without annotation: Are those the only two cases? |
|
Yes, those are the only two cases. The second is likely pretty straightforward. In the first case, |
|
Note - this also fixes issue reported here: |
0682c60 to
d5e8fcc
Compare
|
Updated to hit current implementation of annotated PreFigure images. I think it is likely to work with whatever gets modified in those. Updated SA to not specify Added a sample to SA graphics section with rendering of screenshots. Preview: |
|
Thanks, Andrew. You can see how the annotated PreFigure diagram is scaled due to some changes in the viewBox made by |
|
Just curious to know if you've tested it on the revealjs conversion. I had
to hack something to get images to appear the size I wanted in slides, and
some (good) somewhat recent updates to that conversion broke that hack, so
I'm wondering whether this helps that situation, particularly in
side-by-side situations. (No pressure to test, just curious as to whether
you happen to have done so.)
… Message ID: ***@***.***>
|
|
@kcrisman - It does not appear to affect images in revealjs. The revealjs CSS is completely separated from the normal HTML CSS. The only modification to the HTML that might affect reveal is the addition of a |
|
@kcrisman <https://github.com/kcrisman> - It does not appear to affect
images in revealjs. The revealjs CSS is completely separated from the
normal HTML CSS.
The only modification to the HTML that might affect reveal is the addition
of a <div class="image-box"> around images in sidebysides. That has no
effect I can see on the revealJS rendering.
Interesting; thank you!
|
d5e8fcc to
0fe4742
Compare
Preliminary implementation of defaulting to natural width instead of 100% when images do not have a width specified.
Reasons/situations in which this is preferred:
This implementation is a minimally invasive approach. It leaves the existing image dimension reporting template in place, but has it return a new value as part of its results:
width-nativewhich can be used to figure out if the 100% width is authored or produced by the template. Individual rendering templates can then pick whether to use 100% orautowidth.