From: "Bob Jamison" <[EMAIL PROTECTED]>
Sent: 2005 August 09 Tuesday 19:09


I have a child layer, in which I want to be able to click and get the x and y values of where I clicked -- so far, it's getting the x and y value relative to the page, not the layer. I'm using 3.0.

Hi. Which 3.0? ;-) beta1 (2 years old) or beta2 (released last week). And which browser(s) yield the erroneous behavior? To my understanding, getX/Y is relative to parent, and getPageX/Y is relative to page. So the usage seems correct at first glance. I'll take a closer look.

Hmm, what looks odd to me are these...

var photo = dynapi.document.addChild( new DynLayer(null,0,0,600,400) );
var bg1 = photo.addChild(new DynLayer(null,0,0,600,400));
var lyr1 = photo.addChild(new DynLayer(null,$x,$y,10,10,'red'));

Normally, I assign DynLayer directly to a variable, configure it, and when done use dynapi.document.addChild. I'll try both ways and see what happens.

I have a relative layer down in the html: dynapi.document.insertChild(photo,'relative');

This I don't understand... you already added the DynLayer "photo" to the document once above, now you wish to insert it? So there should be two instances, is this correct? Is it even possible, again, I never tried that. :-) I'll fiddle around and get back later today.

Leif





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Dynapi-Help mailing list
Dynapi-Help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to