Hi Emzic,
> thomas.deweese wrote:
> > If you were using the Transcoders to generate your buffered image
then
> > you will need to either subclass or 'copy and paste' the transcoder
> > code so you can hold onto the BridgeContext and GVT tree. Without the
> > GVT tree you can't do anything that relies on geometry (like figuring
out
> > what element is under a particular point), and the BridgeContext
allows
> > you to map between the GVT tree and the DOM tree.
emzic <[EMAIL PROTECTED]> wrote on 07/16/2008 07:58:18 AM:
> thanks a lot! now i understand what this bridge is for. it links between
the
> GVT tree and the DOM tree, right?
Correct.
> also i could get some code running now, that find s a "shape" at a
certain
> position. but when i try to get the DOM-element of this shape it only
finds
> null.
> GraphicsNode result = gvtRoot.nodeHitAt(p); // finds a shape
> bridgeContext.getElement(result); // returns null
> does that mean that there is no corresponding DOM element to that GVT
> element?
No it means that your BridgeContext wasn't configured to
retain the mapping information. Depending on your needs
you may need to set the BridgeContext 'dynamicState' to at
least INTERACTIVE and possibly DYNAMIC:
bctx.setInteractive(true);
-or-
bctx.setDynamic(true);
Dynamic uses more memory and has more overhead than interactive.
I think you only need interactive.