[Seaside-dev] WABuilder and Render Context

phil at highoctane.be phil at highoctane.be
Tue Aug 26 11:21:19 UTC 2014


On Tue, Aug 26, 2014 at 1:08 PM, Maximilian Bareis <max.bareis at me.com>
wrote:

> Am 25.08.2014 um 18:44 schrieb phil at highoctane.be:
>
>
>
> By any chance, do you have any sample with SeasideDynamicSVG-JQuery ?
>
>
> 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.
>
> It was tested on Seaside 3.1.2 only.
>
>
> This
>
> >>rawSVGContentOn: svg
>
> svg anchor
>  callback: [ self info: 'Poked!' ] ;
> target: '_top' ;
> with: [
>  svg circle
> stroke: Color black;
> strokeWidth: 3 ;
>  fill: Color yellow;
> fillOpacity: 0.8 ;
> opacity: 0.6;
>  center: 50 at 50;
> radius: 30
> ].
>
>
> 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
>

Yeah, thanks. In the meantime, I managed to get it working:

>>drawSVGPokeOn: svg

| passenger |
 svg anchor
passenger: 'YOP';
onClick: ((svg jQuery ajax)
 callback: [ :passengers | passenger := passengers first. self info:
('Poked!', passenger) ] passengers: (svg jQuery this);
 script: [ :s | s << ('alert("Hello ', passenger, '")') js]);
with: [
 svg circle
stroke: Color black;
strokeWidth: 3 ;
 fill: Color yellow;
fillOpacity: 0.8 ;
opacity: 0.6;
 center: 50 at 50;
radius: 30
].

Additional question: what's the best way to get svg figures reflect the
state of the model at the backend?

Phil


>
> Regards
>
> Max
>
>
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20140826/710e4ffd/attachment.htm


More information about the seaside-dev mailing list