From: Matteo Nastasi (mop) Date: Sun, 25 Feb 2007 10:53:52 +0000 (+0000) Subject: modificata gestione per una parseInt che sotto IE produce una eccezione X-Git-Tag: 3.0.0~293 X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=ea1b9d891d0befd7df72e1cf5fec0a34578ed7c2;p=brisk.git modificata gestione per una parseInt che sotto IE produce una eccezione --- 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";