This page is no longer maintained — Please continue to the home page at www.scala-lang.org

rendering embedded svg

1 reply
Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Lifted,

Here you will find the source code for a Scala+Lift application in progress. It's a demonstration of a compositional (read algebraic datatype) for graphs. If you've got graphviz installed and the dot program on your path, then

> mvn jetty:run

followed by pointing your browser at localhost:8080 should do the trick. (If not, i'd be grateful if you'd let me know what you do see.)

In the current state of things, i've got a little repl with a small window in which to type expressions. Pressing the 'go' button evaluates the expr to a normal form for the graph and renders it as svg. However, what's happening currently is that instead of rendering the svg as a drawing it prints out the text of the svg.

i note that if i point a browser at the svg (with header) it renders as a drawing. i also note that if i take the svg and put it inside a static lift page (with the lift:surround tag surrounding it) and add that to the site menu, it renders as a drawing. Obviously, i'm not doing something right in the REPLForm code. Any clues would be greatly appreciated.

Best wishes,

--greg

--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+1 206.650.3740

http://biosimilarity.blogspot.com
Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: rendering embedded svg
Lifted,
i see my problem with the svg -- forgot to build the nodes from the string. As usual, my stupidity overfloweth.
Best wishes,
--greg

On Sun, Jan 4, 2009 at 10:10 PM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
Lifted,

Here you will find the source code for a Scala+Lift application in progress. It's a demonstration of a compositional (read algebraic datatype) for graphs. If you've got graphviz installed and the dot program on your path, then

> mvn jetty:run

followed by pointing your browser at localhost:8080 should do the trick. (If not, i'd be grateful if you'd let me know what you do see.)

In the current state of things, i've got a little repl with a small window in which to type expressions. Pressing the 'go' button evaluates the expr to a normal form for the graph and renders it as svg. However, what's happening currently is that instead of rendering the svg as a drawing it prints out the text of the svg.

i note that if i point a browser at the svg (with header) it renders as a drawing. i also note that if i take the svg and put it inside a static lift page (with the lift:surround tag surrounding it) and add that to the site menu, it renders as a drawing. Obviously, i'm not doing something right in the REPLForm code. Any clues would be greatly appreciated.

Best wishes,

--greg

--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+1 206.650.3740

http://biosimilarity.blogspot.com



--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+1 206.650.3740

http://biosimilarity.blogspot.com

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland