This is a doc-worthy description. I'm ambivalent about whether users need to know about LzViewLinkage.
A On Oct 7, P T Withington wrote: > [Adding Adam, Laszlo-Dev. If Adam agrees with my description, perhaps you > could use this to enhance the documentation.] > > In LZX, each View can have a transformation matrix, which applies to the view > and all it's child views. GetAttributeRelative takes two views, composes the > transforms between those views (there may be intervening views with > transforms, or they may only share a common ancestor), and then applies that > composed transform to the attribute. In theory. The code in each of the > Sprite implementations seems to be limited to a few special cases. > > In English, getAttributeRelative is translating a dimension from one view's > coordinate space to another views's. > > Now that LzViewLinkage is portable, I think you should be able to write a > portable version of GetAttributeRelative. LzView.getLinkage computes the > transform you need, so all you should have to do is get the linkage, make sure > it is up to date, and then apply the transform to the attribute you need. > (Linkage is actually incomplete, as it only computes translation and scaling, > it does not include rotation, but that seems to suffice for now.) > > [Max will tell you that DHTML does not implement the full LZX semantics of > transformations, yet; but that doesn't mean you can't write a portable > solution that works for what _is_ implemented.] > > On 2006-10-07, at 09:32 EDT, Philip Romanik wrote: > > > Hi Tucker, > > > > I looked at getAttributeRelative() and I'm not sure what it is trying to do. > > The documentation isn't much help. The dhtml version is very different than > > the swf version. Is getAttributeRelative() trying to compute the > > location/size of its position within its parent view to the same relative > > position in the reference view? > > > > Thanks! > > > > Phil > > > > > > > Hm... Are you going to dig into that, or do you need some help? > > > > > > On 2006-10-06, at 15:14 EDT, Philip Romanik wrote: > > > > > > > Hi Tucker, > > > > > > > > I tracked this problem down to LzSprite.js. The method > > > > getAttributeRelative() doesn't support 'width' and 'height' like it > > > > should. > > > > > > > > Phil > > > _______________________________________________ Laszlo-dev mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
