[dojo-contributors] Re: Draft: Unified 2D graphics subsystem for Dojo

Eugene Lazutkin eugene at lazutkin.com
Wed Jun 7 22:07:59 EDT 2006


Tom Trenka wrote:
> 
> No, not at all.  In the current Dojo template system, you have the
> custom attributes dojoAttachPoint et al.  What I'm saying is that I
> would preserve that so that when the widget parser runs, it passes
> references and attaches events to the correct node--even if that node
> isn't the same as the original.  For example:
> 
> <svg:rect dojoAttachPoint="rectangleNode"/> would map to
> <v:rect dojoAttachPoint="rectangleNode">
> 
> etc.  That way the widget in question would continue to have a handle
> on the node that represents something manipulatable.

There is a problem with "something manipulatable". I think it is 
possible to preserve a node name during the transformation, but it 
doesn't do a lot of good for manipulation purposes because VML and SVG 
handle it differently.

It may be possible (it was mentioned in the proposal) to use them for 
event processing without major hassle. But if you want to change a 
location of the object, it should be done either by some kind of proxy 
object, or using a specialized API, which takes the node as a parameter 
doing its magic.

It may be even more hairy to change graphical attributes or apply a 
transformation because it may involve adding more nodes or even changing 
the hierarchy of existing nodes, e.g., putting them under a parent to 
facilitate some group changes.

>> http://www.cs.sjsu.edu/faculty/pollett/masters/Semesters/Fall03/JulieNabong/cs298presentation.pdf 
> 
> Already have the paper and have digested a number of things from it,
> thanks.  The main thing I'm looking at is the need to include script
> in the transformation process; I don't think I can load it on the fly
> though, which means there's probably be some duplication of JS stuff
> :(   I may see if I can figure out a way of loading that code, but
> we'll see.

I've read the article too but I didn't understand what they did with a 
JS script in the transformation process. Microsoft's implementation of 
XSLT is more or less acceptable. I never had any worries with it. If you 
understand the reason, please enlighten me.

Thanks,

Eugene



More information about the dojo-contributors mailing list