From: Matt F. <ma...@ne...> - 2001-01-23 23:37:19
|
I created a wrapper widget class around the DynLayer class. What this class allows me to do is change html elements on the fly such as text size, font, and color. I want to be able to drag this layer around also, but since I created this wrapper class, it doesn't work as smooth as when I created my layer directly from DynLayer. After I do: DragEvent.setDragBoundary(aTextObjectLayer) DragEvent.enableDragEvents(aTextObjectLayer) and then try to drag it, moving the layer on the X axis works fine, but it looks like it snaps to the very top or bottom of the parent layer. But if I do the same with a DynLayer, the y axis drag works fine. Is this a bug in DragEvent? You can see it at: http://www.netasolnetworks.com/uprint/drag/testdrag.php?info[]=this+is+a+drag+object&x[]=100&y[]=100 The source of this is at: http://www.netasolnetworks.com/uprint/drag/testTextObject.txt I have is that I am getting an error on line 30: TextObject.prototype=new DynLayer(); I am getting an error saying that DynLayer not defined. Here is what I have when I set up the environment: <script language="Javascript" src="textObject.js"></script> <script language="Javascript" src="../js/dynapi.js"></script> <script language="Javascript" src="tok.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../js/lib/') DynAPI.include('dynapi.api.*') </script> <SCRIPT LANGUAGE="JavaScript" src="textObject.js"></SCRIPT> <==== This is the class <script language="Javascript"> . . . layer = new TextObject(null, "Black", "Helvetica", "10", "Hello World", "12", "15"); . . . </script> Any suggestions? Thanks, Matt |