Smalltalk/X WebserverSmalltalk Dynamic Web Pages - Source of WebDemoApp1-theSVG2: | |
theSVG2:aRequest "a reply, generating svg which is embedded by test_svg2:" |builder| "/ suppress decoration aRequest response replyPresenter:nil. builder := HTML::SVGTreeBuilder new. builder svg; viewBox:(0@0 corner:270@400); width:'100%'; height:'100%'; g; id:'mainlayer'; rect; fill:'red'; stroke:'black'; x:15; y:15; width:100; height:50; onClick:'alert(''you clicked on red'');'; rectEnd; rect; fill:'blue'; stroke:'black'; x:150; y:15; width:100; height:50; rx:12; ry:18; onClick:'alert(''you clicked on blue'');'; rectEnd; gEnd; svgEnd. aRequest response nextPutAll:(builder xmlString)
Edit (disabled)
| |
ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Tue, 10 Dec 2024 20:08:43 GMT |