Closed dyavc closed 1 year ago
repro553.zip repro553.zip has 3 svg files to try in a browser
repro553.dws is a 17.1 workspace which shows the issue 3500⌶ fh ⍝ fit height 100 % only. does not work 3500 ⌶ fwh ⍝ fit width and height 100 %. does not work. 3500 ⌶ fw ⍝ fit width 100 % . This works.
Nicolas says that this is important as it is the default way to view SVG's from SharpPlot, and by default we want them to scale to the window size
For a different real-world example: )load sharpplot.dws
The reason it behave different to opening it in a browser is that RIDE injects the content into the body element of an empty HTML page. The assumption is that the argument to the I beam is going to be some valid HTML markup, but not a complete page.
I'm not sure what to do here. You can get the SVG to fill the page if you add the style attribute:
style="height: -webkit-fill-available; width: -webkit-fill-available;"
Alternatively RIDE doesn't try to wrap the content at all and it is left to the user to provide all the markup. I'm not sure why this approach wasn't used. Is there a drawback I'm missing?
Alternatively RIDE doesn't try to wrap the content at all and it is left to the user to provide all the markup. I'm not sure why this approach wasn't used. Is there a drawback I'm missing?
Let's just do that!
Having looked into the issue and tried various things I noted that:
.svg
extension.I can do point 2 above which would as a bonus allow you to send xml content, give it a *.xml
title and get a browserwindow that renders it as xml.
For svg with the intention to fill the width and height the svg element should have the attribute preserveAspectRatio="none"
and if given an *.svg
title, the svg element needs a style attribute to unset the width and height settings of the browser.
To summarise, it's not clear to me that it is RIDE that is at fault here and I don't think the proposed change on its own resolves the issue reported.
Fixed for electron version in #1128 , can't fix for ZF version
Describe the issue you are having
RIDE 3500⌶ doesn't support SVG with height="100%" This prevents the SVG from fitting the height of the display window. it does support width="100%
Did you connect to an already running interpreter or start the interpreter from RIDE?
Start an interpreter
How do you reproduce the issue?
repro553.dws is a 17.1 workspace which shows the issue. It is attached in a comment below.
3500⌶ fh ⍝ fit height 100 % only. does not work 3500 ⌶ fwh ⍝ fit width and height 100 %. does not work. 3500 ⌶ fw ⍝ fit width 100 % . This works.
⍝ resize the 3500⌶ window : when it has a narrow height, the bottom of the box is not visible, whereas it should be (save SVG to file.svg and open with browser to compare
Paste the contents of Help → About (Shift+F1)