modificata gestione per una parseInt che sotto IE produce una eccezione
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Sun, 25 Feb 2007 10:53:52 +0000 (10:53 +0000)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Sun, 25 Feb 2007 10:53:52 +0000 (10:53 +0000)
web/dom-drag.js

index baf4b66..1b0c8af 100644 (file)
@@ -46,15 +46,23 @@ var Drag = {
                o.root = oRoot && oRoot != null ? oRoot : o ;\r
 \r
                if (o.hmode && isNaN(parseInt(o.root.style.left  ))) {\r
-                       o.root.style.left = document.defaultView.getComputedStyle(o, "").getPropertyValue("left");\r
-                       if (isNaN(parseInt(o.root.style.left)))\r
-                               o.root.style.left   = "0px";\r
-                       }\r
+                    var res = parseInt(getStyle(o, "left", "left"));\r
+                   if (isNaN(res)) {\r
+                       o.root.style.left   = "0px";\r
+                   }\r
+                   else {\r
+                       o.root.style.left   = res;\r
+                   }\r
+               }\r
                if (o.vmode  && isNaN(parseInt(o.root.style.top   ))) {\r
-                       o.root.style.top = document.defaultView.getComputedStyle(o, "").getPropertyValue("top");\r
-                       if (isNaN(parseInt(o.root.style.top)))\r
-                               o.root.style.top   = "0px";\r
-                       }\r
+                    var res = parseInt(getStyle(o, "top", "top"));\r
+                   if (isNaN(res)) {\r
+                       o.root.style.top   = "0px";\r
+                   }\r
+                   else {\r
+                       o.root.style.top   = res;\r
+                   }\r
+               }\r
                if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right  = "0px";\r
                if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";\r
 \r