From ea1b9d891d0befd7df72e1cf5fec0a34578ed7c2 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Sun, 25 Feb 2007 10:53:52 +0000 Subject: [PATCH] modificata gestione per una parseInt che sotto IE produce una eccezione --- web/dom-drag.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/web/dom-drag.js b/web/dom-drag.js index baf4b66..1b0c8af 100644 --- a/web/dom-drag.js +++ b/web/dom-drag.js @@ -46,15 +46,23 @@ var Drag = { o.root = oRoot && oRoot != null ? oRoot : o ; if (o.hmode && isNaN(parseInt(o.root.style.left ))) { - o.root.style.left = document.defaultView.getComputedStyle(o, "").getPropertyValue("left"); - if (isNaN(parseInt(o.root.style.left))) - o.root.style.left = "0px"; - } + var res = parseInt(getStyle(o, "left", "left")); + if (isNaN(res)) { + o.root.style.left = "0px"; + } + else { + o.root.style.left = res; + } + } if (o.vmode && isNaN(parseInt(o.root.style.top ))) { - o.root.style.top = document.defaultView.getComputedStyle(o, "").getPropertyValue("top"); - if (isNaN(parseInt(o.root.style.top))) - o.root.style.top = "0px"; - } + var res = parseInt(getStyle(o, "top", "top")); + if (isNaN(res)) { + o.root.style.top = "0px"; + } + else { + o.root.style.top = res; + } + } if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px"; if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px"; -- 2.17.1