Example showing interaction with SVG?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Example showing interaction with SVG?

Stephan Eggermont-3
The examples in SeasideDynamicsSVG are all static/motion. Is there some sample code showing some interaction (dragging elements around, clicking)?

Stephan_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Example showing interaction with SVG?

Gerhard Obermann
You could try my Raphael (http://www.squeaksource.com/Raphael') wrapper!
It already has drag and drop and click event handling.

On Tue, Feb 15, 2011 at 11:18 PM, Stephan Eggermont <[hidden email]> wrote:
The examples in SeasideDynamicsSVG are all static/motion. Is there some sample code showing some interaction (dragging elements around, clicking)?

Stephan_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Example showing interaction with SVG?

Johan Brichau-2
In reply to this post by Stephan Eggermont-3
You can simply add an onClick handler to any svg element, just like you add it to any html element.

There is also an svg plugin for jQuery (http://keith-wood.name/svg.html) that enables jQuery over SVG.
We also added a jQuery wrapper for that extension to SeasideDynamicSVG that allows to dynamically load/add svg content to your webpage.

We have a (rather dirty) solution for drag/drop of svg elements, based on drag/drop of prototype/scriptaculous. It's our intent to clean that solution and provide a better integration with jQuery and Seaside. If you want, we can share that code already so we can improve it together. What do you say?

Cheers
Johan

On 15 Feb 2011, at 23:18, Stephan Eggermont wrote:

> The examples in SeasideDynamicsSVG are all static/motion. Is there some sample code showing some interaction (dragging elements around, clicking)?
>
> Stephan_______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Example showing interaction with SVG?

Bernat Romagosa
+1 for sharing that! :)

I'm looking for a particular solution in my app, and SVG might do the job.

Cheers,

Bernat Romagosa

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Example showing interaction with SVG?

Stephan Eggermont-3
In reply to this post by Stephan Eggermont-3
Gerhard Obermann wrote:
>You could try my Raphael (http://www.squeaksource.com/Raphael') wrapper!
>
>It already has drag and drop and click event handling.

The event handling looks a bit different from that in other seaside libraries (e.g. no onClick:).
It looks very client-side oriented -> javascript only? Does it combine well with e.g. jQuery?

The samples are very nice, but I couldn't get Raphael to work with IE (the main reason to
want to use it instead of straight svg). As soon as the number of elements you draw gets large,
IE simply drops elements. I was drawing a year calendar, consisting of about 500 lines and
a few circles and texts, and that just didn't work.

Stephan



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Example showing interaction with SVG?

Stephan Eggermont-3
In reply to this post by Stephan Eggermont-3
Johan Brichau wrote:
>You can simply add an onClick handler to any svg element, just like you add it to any html element.

Thank you, that was easy :)

>We have a (rather dirty) solution for drag/drop of svg elements, based on drag/drop of prototype/scriptaculous. It's our intent to clean that >solution and provide a better integration with jQuery and Seaside. If you want, we can share that code already so we can improve it >together. What do you say?

I'd like that. I'll contact you directly next week.

Stephan_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Example showing interaction with SVG?

Gerhard Obermann
In reply to this post by Stephan Eggermont-3
Since IE does not have native SVG Support,
Raphael renders VML instead of SVG.
VML and/or IE has a slow rendering performance with Raphael.
This should be obsolete with IE 9 and new Raphael versions!

Event handling is of course Client side, but should work with JQuery.
For good SVG performance you should use Opera or Chrome.

Gerhard


On Thu, Feb 17, 2011 at 8:58 PM, Stephan Eggermont <[hidden email]> wrote:
Gerhard Obermann wrote:
>You could try my Raphael (http://www.squeaksource.com/Raphael') wrapper!
>
>It already has drag and drop and click event handling.

The event handling looks a bit different from that in other seaside libraries (e.g. no onClick:).
It looks very client-side oriented -> javascript only? Does it combine well with e.g. jQuery?

The samples are very nice, but I couldn't get Raphael to work with IE (the main reason to
want to use it instead of straight svg). As soon as the number of elements you draw gets large,
IE simply drops elements. I was drawing a year calendar, consisting of about 500 lines and
a few circles and texts, and that just didn't work.

Stephan



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Example showing interaction with SVG?

Lorenzo
In reply to this post by Johan Brichau-2
Hi Johan,

I have a very good knowledge of Digitalk VSE and I am going to learn how to
use Pharo.
I am porting a projet of mine for creating fuzzy logic diagrams.
So, if you are patient, I would be pleased in becoming proficient in using
SeasideDynamicSVG for JQuery and, if possible, sharing code for improving
both my application and the standard package.

Let me know.

Grazie

Lorenzo

Please, find attached the original presentation at ESUG held in Brescia some
years ago of my project on fuzzy logic model
----- Original Message -----
From: "Johan Brichau" <[hidden email]>
To: "Seaside - general discussion" <[hidden email]>
Sent: Wednesday, February 16, 2011 10:49 AM
Subject: Re: [Seaside] Example showing interaction with SVG?


You can simply add an onClick handler to any svg element, just like you add
it to any html element.

There is also an svg plugin for jQuery (http://keith-wood.name/svg.html)
that enables jQuery over SVG.
We also added a jQuery wrapper for that extension to SeasideDynamicSVG that
allows to dynamically load/add svg content to your webpage.

We have a (rather dirty) solution for drag/drop of svg elements, based on
drag/drop of prototype/scriptaculous. It's our intent to clean that solution
and provide a better integration with jQuery and Seaside. If you want, we
can share that code already so we can improve it together. What do you say?

Cheers
Johan

On 15 Feb 2011, at 23:18, Stephan Eggermont wrote:

> The examples in SeasideDynamicsSVG are all static/motion. Is there some
> sample code showing some interaction (dragging elements around, clicking)?
>
> Stephan_______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

englishFuzzyObjects.ppt (112K) Download Attachment