From: Matthias F. <m.f...@iq...> - 2003-08-13 10:28:26
|
Hello! I tried to use 'setAnchor'. All works fine in different browsers (NS4.7, NS7.0, IE6.0/SP1 and Opera 7.11, all in german version) when I use (complete code at the end of the email): testlayer.setAnchor({anchorLeft:'test',anchorTop:'test'}); When I use: testlayer.setAnchor({leftA:'test',topA:'test'}); it seems to be almost the same but Opera shows a differece value for y position (-14 instead of 0 !). So where is the difference between 'anchorTop' and 'topA'?=20 Is there only the example (dynapi.api.dynlayer-anchor-anchoring.html) or can I find some tutorials for the new features of DynApi3? Thank you for your answer, Matthias Here ist the complete code I used: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Unbenannt</title> <script language=3D"JavaScript" src=3D"dynapi3x/src/dynapi.js"></script> <script language=3D"JavaScript"> <!-- dynapi.library.setPath('dynapi3x/src/'); dynapi.library.include('dynapi.api'); dynapi.library.include('dynapi.library'); dynapi.library.include('DragEvent'); //--> </script> <script language=3D"Javascript"> <!-- testlayer =3D new DynLayer(null,0,0,2,2,'#ff0000'); dynapi.document.addChild(testlayer); // testlayer.setAnchor({leftA:'test',topA:'test'}); testlayer.setAnchor({anchorLeft:'test',anchorTop:'test'}); =20 function showPosition() { x =3D testlayer.getX(); y =3D testlayer.getY(); alert('X: '+x+' Y: '+y); } //--> </script> </head> <body bgcolor=3D"#ffffff" text=3D"#085f10" leftmargin=3D"0" = topmargin=3D"0" marginwidth=3D"0" marginheight=3D"0"> <a name=3D"test" id=3D"test"><img = src=3D"dynapi3x/examples/images/pixel.gif" width=3D"1" height=3D"1" alt=3D"" border=3D"0"></a><br> Some content<br> <br> ...<br> <a href=3D"javascript:showPosition();">show layer position</a> </body> </html> |