X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fdom-drag.js;h=1b0c8af448ec91cf1c01a988fd79dec1bd1da3be;hb=ca639ef6d55d2e1bb85fd18a502d438ca08d3995;hp=baf4b66227c7b767fb6c89c24b255f82574023a5;hpb=5606e6a2cb57a6fda17170e3a07c084373a6b9e5;p=brisk.git 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";