X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fdom-drag.js;h=4150f81b1ab431c9766de4d57810fb736beaee46;hb=9fe7c6c2413b91e1b738603d4fbc039e59d895db;hp=baf4b66227c7b767fb6c89c24b255f82574023a5;hpb=5606e6a2cb57a6fda17170e3a07c084373a6b9e5;p=brisk.git diff --git a/web/dom-drag.js b/web/dom-drag.js index baf4b66..4150f81 100644 --- a/web/dom-drag.js +++ b/web/dom-drag.js @@ -1,7 +1,10 @@ /* * brisk - dom-drag.js * - * Copyright (C) 2006 matteo.nastasi@milug.org + * Copyright (C) 2006-2008 Matteo Nastasi + * mailto: nastasi@alternativeoutput.it + * matteo.nastasi@milug.org + * web: http://www.alternativeoutput.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,15 +49,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";