projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Poll class added
[brisk.git]
/
web
/
dom-drag.js
diff --git
a/web/dom-drag.js
b/web/dom-drag.js
index
baf4b66
..
4150f81
100644
(file)
--- a/
web/dom-drag.js
+++ b/
web/dom-drag.js
@@
-1,7
+1,10
@@
/*
\r
* brisk - dom-drag.js
\r
*
\r
/*
\r
* brisk - dom-drag.js
\r
*
\r
- * Copyright (C) 2006 matteo.nastasi@milug.org
\r
+ * Copyright (C) 2006-2008 Matteo Nastasi
\r
+ * mailto: nastasi@alternativeoutput.it
\r
+ * matteo.nastasi@milug.org
\r
+ * web: http://www.alternativeoutput.it
\r
*
\r
* This program is free software; you can redistribute it and/or modify
\r
* it under the terms of the GNU General Public License as published by
\r
*
\r
* This program is free software; you can redistribute it and/or modify
\r
* it under the terms of the GNU General Public License as published by
\r
@@
-46,15
+49,23
@@
var Drag = {
o.root = oRoot && oRoot != null ? oRoot : o ;
\r
\r
if (o.hmode && isNaN(parseInt(o.root.style.left ))) {
\r
o.root = oRoot && oRoot != null ? oRoot : o ;
\r
\r
if (o.hmode && isNaN(parseInt(o.root.style.left ))) {
\r
- o.root.style.left = document.defaultView.getComputedStyle(o, "").getPropertyValue("left");
\r
- if (isNaN(parseInt(o.root.style.left)))
\r
- o.root.style.left = "0px";
\r
- }
\r
+ var res = parseInt(getStyle(o, "left", "left"));
\r
+ if (isNaN(res)) {
\r
+ o.root.style.left = "0px";
\r
+ }
\r
+ else {
\r
+ o.root.style.left = res;
\r
+ }
\r
+ }
\r
if (o.vmode && isNaN(parseInt(o.root.style.top ))) {
\r
if (o.vmode && isNaN(parseInt(o.root.style.top ))) {
\r
- o.root.style.top = document.defaultView.getComputedStyle(o, "").getPropertyValue("top");
\r
- if (isNaN(parseInt(o.root.style.top)))
\r
- o.root.style.top = "0px";
\r
- }
\r
+ var res = parseInt(getStyle(o, "top", "top"));
\r
+ if (isNaN(res)) {
\r
+ o.root.style.top = "0px";
\r
+ }
\r
+ else {
\r
+ o.root.style.top = res;
\r
+ }
\r
+ }
\r
if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px";
\r
if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";
\r
\r
if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px";
\r
if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";
\r
\r