co-dan / interactive-diagrams

Interactive-diagrams
39 stars 2 forks source link

Make the SVG images bigger #12

Closed co-dan closed 10 years ago

co-dan commented 10 years ago

Make the SVG images bigger, scale the size according to.. something

An example of bad image scaling: http://orbt.io/QD6E.png

byorgey commented 10 years ago

If you know how big the display area is, you should pass its size in as part of the render options record (i.e. passing in Dims w h). If you don't specify a size the result will just be scaled "absolutely", i.e. taking the diagram units as pixels or whatever.

I don't know how helpful this is, but thought I would mention it...

co-dan commented 10 years ago

@byorgey That is exactly what I am doing, the problem is that in the current version the w and h parameters are hard-coded :) https://github.com/co-dan/interactive-diagrams/blob/master/display-src/Display.hs#L137

byorgey commented 10 years ago

Ah, I see, yes, that would be a problem =)

co-dan commented 10 years ago

The hack should not really count for the solution, but I am postponing this issue.

I tried the following: using the tag, using the tag, scale+ inside , and generally things from http://edutechwiki.unige.ch/en/Using_SVG_with_HTML5_tutorial; but to no avail.

co-dan commented 10 years ago

The images can now be scaled so I think I'm going to close this.