X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fdom-drag.js;h=4150f81b1ab431c9766de4d57810fb736beaee46;hb=9fe7c6c2413b91e1b738603d4fbc039e59d895db;hp=5f99f97cdf1dc3c203639dc91313f6a7dda0fb1f;hpb=f406d58f75cd486eaab74be94faf70d516684e5a;p=brisk.git diff --git a/web/dom-drag.js b/web/dom-drag.js index 5f99f97..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 = window.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 = window.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";