<div dir="ltr"><div class="gmail_extra"><div><div dir="ltr"><div>On Tue, Aug 26, 2014 at 1:08 PM, Maximilian Bareis <span dir="ltr">&lt;<a href="mailto:max.bareis@me.com" target="_blank">max.bareis@me.com</a>&gt;</span> wrote:<br>

</div></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">

Am 25.08.2014 um 18:44 schrieb <a href="mailto:phil@highoctane.be" target="_blank">phil@highoctane.be</a>:<br><div><br><blockquote type="cite"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

<div dir="ltr"><div class="gmail_extra"><div><div dir="ltr"><br></div></div><div class="gmail_quote"><div><br></div><div>By any chance, do you have any sample with SeasideDynamicSVG-JQuery ?</div></div></div></div></div>
</blockquote>
<div><br></div><div>I have checked in a new version of SeasideDynamicSVG-Core /-jQuery /-Examples. There is a small example that changes svg tag attribute with the use of jquery. It is a simple example to show the main behavior of jQuery.</div>

<div><br></div><div>It was tested on Seaside 3.1.2 only.</div><br><blockquote type="cite"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>This </div><div><br></div><div>&gt;&gt;rawSVGContentOn: svg </div><div><br></div><div><span style="white-space:pre-wrap">        </span>svg anchor<br>

</div><div><span style="white-space:pre-wrap">                </span>callback: [ self info: &#39;Poked!&#39; ] ;</div><div><span style="white-space:pre-wrap">                </span>target: &#39;_top&#39; ;</div><div><span style="white-space:pre-wrap">                </span>with: [</div>

<div><span style="white-space:pre-wrap">                        </span>svg circle</div><div><span style="white-space:pre-wrap">                                </span>stroke: Color black;</div><div><span style="white-space:pre-wrap">                                </span>strokeWidth: 3 ;</div><div>

<span style="white-space:pre-wrap">                                </span>fill: Color yellow;</div><div><span style="white-space:pre-wrap">                                </span>fillOpacity: 0.8 ;</div><div><span style="white-space:pre-wrap">                                </span>opacity: 0.6;</div><div>

<span style="white-space:pre-wrap">                                </span>center: 50@50;</div><div><span style="white-space:pre-wrap">                                </span>radius: 30</div><div><span style="white-space:pre-wrap">                        </span>].</div><div><br></div></div></div></div>

</div></blockquote><div><br></div><div>If you use anchor and callback, you do not use jQuery. For jQuery you normally use events like onClick, onChange and so on. Even for anchors you would use onClick instead of callback. It is possible to mix jQuery and Callback but for the beginning I suggest to stick on the events. Also have a look at the jQuery chapter in Seaside book</div>

</div></div></blockquote><div><br></div><div>Yeah, thanks. In the meantime, I managed to get it working:</div><div><br></div><div>&gt;&gt;drawSVGPokeOn: svg</div><div> </div><div><span class="" style="white-space:pre">        </span>| passenger |</div>

<div><span class="" style="white-space:pre">        </span></div><div><span class="" style="white-space:pre">        </span>svg anchor</div><div><span class="" style="white-space:pre">                </span>passenger: &#39;YOP&#39;;</div><div><span class="" style="white-space:pre">                </span>onClick: ((svg jQuery ajax) </div>

<div><span class="" style="white-space:pre">                        </span>callback: [ :passengers | passenger := passengers first. self info: (&#39;Poked!&#39;, passenger) ]<span class="" style="white-space:pre">        </span> passengers: (svg jQuery this);</div>

<div><span class="" style="white-space:pre">                        </span>script: [ :s | s &lt;&lt; (&#39;alert(&quot;Hello &#39;, passenger, &#39;&quot;)&#39;) js]);</div><div><span class="" style="white-space:pre">                </span>with: [</div><div>

<span class="" style="white-space:pre">                        </span>svg circle</div><div><span class="" style="white-space:pre">                                </span>stroke: Color black;</div><div><span class="" style="white-space:pre">                                </span>strokeWidth: 3 ;</div>

<div><span class="" style="white-space:pre">                                </span>fill: Color yellow;</div><div><span class="" style="white-space:pre">                                </span>fillOpacity: 0.8 ;</div><div><span class="" style="white-space:pre">                                </span>opacity: 0.6;</div>

<div><span class="" style="white-space:pre">                                </span>center: 50@50;</div><div><span class="" style="white-space:pre">                                </span>radius: 30</div><div><span class="" style="white-space:pre">                        </span>].</div><div><br></div>

<div>Additional question: what&#39;s the best way to get svg figures reflect the state of the model at the backend?</div><div><br></div><div>Phil</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div style="word-wrap:break-word"><div><br></div><div>Regards</div><div><br></div><div>Max</div><br></div><br>_______________________________________________<br>
seaside-dev mailing list<br>
<a href="mailto:seaside-dev@lists.squeakfoundation.org">seaside-dev@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev</a><br>
<br></blockquote></div><br></div></div>