dir tree refactored
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.com>
Wed, 7 Dec 2011 08:20:31 +0000 (09:20 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.com>
Wed, 7 Dec 2011 08:20:31 +0000 (09:20 +0100)
32 files changed:
commons.js [deleted file]
img/arrow_do.png [deleted file]
img/arrow_le.png [deleted file]
img/arrow_ri.png [deleted file]
img/arrow_up.png [deleted file]
test-base.html [deleted file]
test-dd.html [deleted file]
test-div-coord.html [deleted file]
web/img/arrow_do.png [new file with mode: 0644]
web/img/arrow_le.png [new file with mode: 0644]
web/img/arrow_ri.png [new file with mode: 0644]
web/img/arrow_up.png [new file with mode: 0644]
web/test-base.html [new file with mode: 0644]
web/test-dd.html [new file with mode: 0644]
web/test-div-coord.html [new file with mode: 0644]
web/xynt-base-test.js [new file with mode: 0644]
web/xynt-dd-test.js [new file with mode: 0644]
web/xynt-div-coord-test.js [new file with mode: 0644]
web/xynt/xynt-base.js [new file with mode: 0644]
web/xynt/xynt-commons.js [new file with mode: 0644]
web/xynt/xynt-connect.js [new file with mode: 0644]
web/xynt/xynt-console.js [new file with mode: 0644]
web/xynt/xynt-dd.js [new file with mode: 0644]
web/xynt/xynt-link.js [new file with mode: 0644]
xynt-base-test.js [deleted file]
xynt-base.js [deleted file]
xynt-connect.js [deleted file]
xynt-console.js [deleted file]
xynt-dd-test.js [deleted file]
xynt-dd.js [deleted file]
xynt-div-coord-test.js [deleted file]
xynt-link.js [deleted file]

diff --git a/commons.js b/commons.js
deleted file mode 100644 (file)
index cb8076f..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-function $(id) { return document.getElementById(id); }
-
-function getStyle(x,IEstyleProp, MozStyleProp) 
-{
-    if (x.currentStyle) {
-        var y = x.currentStyle[IEstyleProp];
-    } else if (window.getComputedStyle) {
-        var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(MozStyleProp);
-    }
-    return y;
-}
-
-  /* replacement of setInterval on IE */
-(function(){
-    /*if not IE, do nothing*/
-    if(!document.uniqueID){return;};
-
-    /*Copy the default setInterval behavior*/
-    var nativeSetInterval = window.setInterval;
-    window.setInterval = function(fn,ms) {              
-        var param = [];
-        if(arguments.length <= 2)       {
-            return nativeSetInterval(fn,ms);
-        }
-        else {
-            for(var i=2;i<arguments.length;i+=1) {
-                param[i-2] =  arguments[i];
-            }   
-        }
-        
-        if(typeof(fn)=='function') {
-            
-            return (function (fn,ms,param) {
-                var fo = function () {                                                          
-                    fn.apply(window,param);
-                };                      
-                return nativeSetInterval(fo,ms); 
-            })(fn,ms,param);
-        }
-        else if(typeof(fn)=='string')
-        {
-            return  nativeSetInterval(fn,ms);
-        }
-        else
-        {
-            throw Error('setInterval Error\nInvalid function type');
-        };
-    };
-
-    /*Copy the default setTimeout behavior*/
-    var nativeSetTimeout = window.setTimeout;
-    window.setTimeout = function(fn,ms) {               
-        var param = [];
-        if(arguments.length <= 2)       {
-            return nativeSetTimeout(fn,ms);
-        }
-        else {
-            for(var i=2;i<arguments.length;i+=1) {
-                param[i-2] =  arguments[i];
-            }   
-        }
-        
-        if(typeof(fn)=='function') {
-            
-            return (function (fn,ms,param) {
-                var fo = function () {                                                          
-                    fn.apply(window,param);
-                };                      
-                return nativeSetTimeout(fo,ms); 
-            })(fn,ms,param);
-        }
-        else if(typeof(fn)=='string')
-        {
-            return  nativeSetTimeout(fn,ms);
-        }
-        else
-        {
-            throw Error('setTimeout Error\nInvalid function type');
-        };
-    };
-
-})()
-
-function getStyle(x,IEstyleProp, MozStyleProp) 
-{
-    if (x.currentStyle) {
-        var y = x.currentStyle[IEstyleProp];
-    } else if (window.getComputedStyle) {
-        var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(MozStyleProp);
-    }
-    return y;
-}
-
-function doSomething(e) {
-       if (!e) var e = window.event
-       // handle event
-       e.cancelBubble = true;
-       if (e.stopPropagation) e.stopPropagation();
-}
\ No newline at end of file
diff --git a/img/arrow_do.png b/img/arrow_do.png
deleted file mode 100644 (file)
index 7815d6f..0000000
Binary files a/img/arrow_do.png and /dev/null differ
diff --git a/img/arrow_le.png b/img/arrow_le.png
deleted file mode 100644 (file)
index c910177..0000000
Binary files a/img/arrow_le.png and /dev/null differ
diff --git a/img/arrow_ri.png b/img/arrow_ri.png
deleted file mode 100644 (file)
index 9506d7a..0000000
Binary files a/img/arrow_ri.png and /dev/null differ
diff --git a/img/arrow_up.png b/img/arrow_up.png
deleted file mode 100644 (file)
index a3bb571..0000000
Binary files a/img/arrow_up.png and /dev/null differ
diff --git a/test-base.html b/test-base.html
deleted file mode 100644 (file)
index 5fb1830..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-<head>
-<script type="text/javascript" src="commons.js"></script>
-<script type="text/javascript" src="xynt-console.js"></script>
-<script type="text/javascript" src="xynt-base.js"></script>
-<script type="text/javascript" src="xynt-base-test.js"></script>
-
-</head>
-<body>
-</body>
-</html>
diff --git a/test-dd.html b/test-dd.html
deleted file mode 100644 (file)
index 8fdfaf4..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<html>
-<head>
-<script type="text/javascript" src="commons.js"></script>
-<script type="text/javascript" src="xynt-base.js"></script>
-<script type="text/javascript" src="xynt-connect.js"></script>
-<script type="text/javascript" src="xynt-dd.js"></script>
-<script type="text/javascript" src="xynt-link.js"></script>
-<script type="text/javascript" src="xynt-dd-test.js"></script>
-</head>
-<body>
-<!-- task:begin -->
-<div id="board" style="width: 1600; height: 800px; background-color: #f0f0f0; border: 1px solid black; position: relative;">
-
-  <div id="t1" style="z-index: 1; left: 10px; top: 10px; width: 100px; height: 21px; border: 1px solid gray; background-color: #c0c0ff; position: absolute;"></div>
-  
-</div>
-</body>
-</html>
diff --git a/test-div-coord.html b/test-div-coord.html
deleted file mode 100644 (file)
index f9ada6b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<html>
-<head>
-<script type="text/javascript" src="commons.js"></script>
-<script type="text/javascript" src="xynt-base.js"></script>
-<script type="text/javascript" src="xynt-console.js"></script>
-<script type="text/javascript" src="xynt-connect.js"></script>
-<script type="text/javascript" src="xynt-dd.js"></script>
-<script type="text/javascript" src="xynt-link.js"></script>
-<script type="text/javascript" src="xynt-div-coord-test.js"></script>
-
-</head>
-<body style="margin: 0px; padding: 0px;">
-<!-- task:begin -->
-
-<div  id="board" style="width: 10%; height: 10%; background-color: #f0f0f0; border: 1px solid #a0a0a0; position: absolute; overflow-y: scroll; overflow-x: scroll;" onclick="resize();" onscroll="scroll2('scroll');">
-aa1<br>aa2<br>aa3<br>aa4<br>aa5<br>aa6<br>aa7<br>aa8<br>aa9<br>aaA<br>aaB<br>aaC<br>aaD<br>aaE<br>aaF<br>aa0<br>
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<br>
-bb1<br>bb2<br>bb3<br>bb4<br>bb5<br>bb6<br>bb7<br>bb8<br>bb9<br>bbA<br>bbB<br>bbC<br>bbD<br>bbE<br>bbF<br>bb0<br>
-</div>
-
-<div id="board-drag" style="width: 6px; height: 10%; background-color: #e0e0e0; border: 1px solid #a0a0a0; position: absolute; visibility: visible;"></div>
-
-<div id="board2" style="width: 10%; height: 10%; background-color: #f0f0f0; border: 1px solid #a0a0a0; overflow-y: scroll; position: absolute;" onclick="resize();" onscroll="scroll('scroll');">
-aa1<br>aa2<br>aa3<br>aa4<br>aa5<br>aa6<br>aa7<br>aa8<br>aa9<br>aaA<br>aaB<br>aaC<br>aaD<br>aaE<br>aaF<br>aa0<br>
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<br>
-bb1<br>bb2<br>bb3<br>bb4<br>bb5<br>bb6<br>bb7<br>bb8<br>bb9<br>bbA<br>bbB<br>bbC<br>bbD<br>bbE<br>bbF<br>bb0<br>
-</div>
-  
-</body>
-</html>
diff --git a/web/img/arrow_do.png b/web/img/arrow_do.png
new file mode 100644 (file)
index 0000000..7815d6f
Binary files /dev/null and b/web/img/arrow_do.png differ
diff --git a/web/img/arrow_le.png b/web/img/arrow_le.png
new file mode 100644 (file)
index 0000000..c910177
Binary files /dev/null and b/web/img/arrow_le.png differ
diff --git a/web/img/arrow_ri.png b/web/img/arrow_ri.png
new file mode 100644 (file)
index 0000000..9506d7a
Binary files /dev/null and b/web/img/arrow_ri.png differ
diff --git a/web/img/arrow_up.png b/web/img/arrow_up.png
new file mode 100644 (file)
index 0000000..a3bb571
Binary files /dev/null and b/web/img/arrow_up.png differ
diff --git a/web/test-base.html b/web/test-base.html
new file mode 100644 (file)
index 0000000..5fb1830
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<head>
+<script type="text/javascript" src="commons.js"></script>
+<script type="text/javascript" src="xynt-console.js"></script>
+<script type="text/javascript" src="xynt-base.js"></script>
+<script type="text/javascript" src="xynt-base-test.js"></script>
+
+</head>
+<body>
+</body>
+</html>
diff --git a/web/test-dd.html b/web/test-dd.html
new file mode 100644 (file)
index 0000000..23ccc3c
--- /dev/null
@@ -0,0 +1,18 @@
+<html>
+<head>
+<script type="text/javascript" src="xynt/xynt-commons.js"></script>
+<script type="text/javascript" src="xynt/xynt-base.js"></script>
+<script type="text/javascript" src="xynt/xynt-connect.js"></script>
+<script type="text/javascript" src="xynt/xynt-dd.js"></script>
+<script type="text/javascript" src="xynt/xynt-link.js"></script>
+<script type="text/javascript" src="xynt-dd-test.js"></script>
+</head>
+<body>
+<!-- task:begin -->
+<div id="board" style="width: 1600; height: 800px; background-color: #f0f0f0; border: 1px solid black; position: relative;">
+
+  <div id="t1" style="z-index: 1; left: 10px; top: 10px; width: 100px; height: 21px; border: 1px solid gray; background-color: #c0c0ff; position: absolute;"></div>
+  
+</div>
+</body>
+</html>
diff --git a/web/test-div-coord.html b/web/test-div-coord.html
new file mode 100644 (file)
index 0000000..6217fc9
--- /dev/null
@@ -0,0 +1,30 @@
+<html>
+<head>
+<script type="text/javascript" src="xynt/xynt-commons.js"></script>
+<script type="text/javascript" src="xynt/xynt-base.js"></script>
+<script type="text/javascript" src="xynt/xynt-console.js"></script>
+<script type="text/javascript" src="xynt/xynt-connect.js"></script>
+<script type="text/javascript" src="xynt/xynt-dd.js"></script>
+<script type="text/javascript" src="xynt/xynt-link.js"></script>
+<script type="text/javascript" src="xynt-div-coord-test.js"></script>
+
+</head>
+<body style="margin: 0px; padding: 0px;">
+<!-- task:begin -->
+
+<div  id="board" style="width: 10%; height: 10%; background-color: #f0f0f0; border: 1px solid #a0a0a0; position: absolute; overflow-y: scroll; overflow-x: scroll;" onclick="resize();" onscroll="scroll2('scroll');">
+aa1<br>aa2<br>aa3<br>aa4<br>aa5<br>aa6<br>aa7<br>aa8<br>aa9<br>aaA<br>aaB<br>aaC<br>aaD<br>aaE<br>aaF<br>aa0<br>
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<br>
+bb1<br>bb2<br>bb3<br>bb4<br>bb5<br>bb6<br>bb7<br>bb8<br>bb9<br>bbA<br>bbB<br>bbC<br>bbD<br>bbE<br>bbF<br>bb0<br>
+</div>
+
+<div id="board-drag" style="width: 6px; height: 10%; background-color: #e0e0e0; border: 1px solid #a0a0a0; position: absolute; visibility: visible;"></div>
+
+<div id="board2" style="width: 10%; height: 10%; background-color: #f0f0f0; border: 1px solid #a0a0a0; overflow-y: scroll; position: absolute;" onclick="resize();" onscroll="scroll('scroll');">
+aa1<br>aa2<br>aa3<br>aa4<br>aa5<br>aa6<br>aa7<br>aa8<br>aa9<br>aaA<br>aaB<br>aaC<br>aaD<br>aaE<br>aaF<br>aa0<br>
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<br>
+bb1<br>bb2<br>bb3<br>bb4<br>bb5<br>bb6<br>bb7<br>bb8<br>bb9<br>bbA<br>bbB<br>bbC<br>bbD<br>bbE<br>bbF<br>bb0<br>
+</div>
+  
+</body>
+</html>
diff --git a/web/xynt-base-test.js b/web/xynt-base-test.js
new file mode 100644 (file)
index 0000000..2b45c79
--- /dev/null
@@ -0,0 +1,139 @@
+function A(a, b) {
+    this.a_dyn = "A DYN";
+    this.a = a;
+    this.b = b;
+}
+
+A.prototype = {
+    a_stat: "A STAT",
+
+    a_func: function () {
+        console.log("a_func run");
+    },
+    aa_func: function () {
+        console.log("aa_func run in A class");
+    }
+}
+
+function B(a, b) {
+    this.b_dyn = "B DYN";
+    A.call(this, a, b);
+}
+
+B.prototype = {
+    b_stat: "B STAT",
+
+    a_func: function () {
+        console.log("a_func run from B");
+        console.log("and now try to call the super method");
+        this.callSuper("a_func");
+    },
+
+    b_func: function () {
+        console.log("b_func run");
+    }
+}
+function C() {
+    this.c_dyn = "C DYN";
+}
+
+C.prototype = {
+    c_stat: "C STAT",
+
+    aa_func: function () {
+        console.log("aa_func run in C class");
+    },
+
+    c_func: function () {
+        console.log("c_func run");
+    }
+}
+
+Extends(B, A);
+
+function print_dynstat(inst, name)
+{
+    for (i = 0 ; i < inst.length ; i++) {
+        console.log(name[i]+".a_dyn: "+inst[i].a_dyn);
+        console.log(name[i]+".a_stat: "+inst[i].a_stat);
+        if (name[i][0] == 'b') {
+            console.log(name[i]+".b_dyn: "+inst[i].b_dyn);
+            console.log(name[i]+".b_stat: "+inst[i].b_stat);
+        }
+        if (name[i][0] == 'c') {
+            console.log(name[i]+".c_dyn: "+inst[i].c_dyn);
+            console.log(name[i]+".c_stat: "+inst[i].c_stat);
+        }
+    }
+}
+
+window.onload = function () {
+    console.log("Window.onload: begin");
+    show_class(A);
+    show_class(B);
+    show_class(C);
+
+    a1 = new A(1,2);
+    a2 = new A(3,4);
+    b1 = new B(5,6);
+    c1 = new C();
+
+    arr_inst = [  a1 ,  a2 ,  b1 ,  c1  ];
+    arr_name = [ "a1", "a2", "b1", "c1" ];
+
+    print_dynstat(arr_inst, arr_name);
+
+    console.log("---");
+    console.log("ACTION: a1.a_stat = \"CHANGED\";");
+    a1.a_stat = "CHANGED";
+
+    print_dynstat(arr_inst, arr_name);
+
+    console.log("---");
+    console.log("ACTION: A.prototype.a_stat = \"PROTO CHANGED\"");
+    A.prototype.a_stat = "PROTO CHANGED";
+
+    print_dynstat(arr_inst, arr_name);
+
+    console.log("---");
+    console.log("ACTION: ExtendsInst(c1, A, [1, 33])");
+
+    var ext = ExtendsInst(c1, A, [1, 33]);
+    console.log("ExtInst: "+(ext == true ? "TRUE" : "FALSE"));
+// } function azaz() {
+    print_dynstat(arr_inst, arr_name);
+
+    console.log("---");
+    console.log("ACTION: B.prototype.a_stat = \"PROTO CHANGED\"");
+    B.prototype.a_stat = "PROTO CHANGED";
+
+    print_dynstat(arr_inst, arr_name);
+
+    console.log("---");
+    console.log("ACTION: A.prototype.a_stat = \"PROTO CHANGED 2\"");
+    console.log("ACTION: C.prototype.c_stat = \"PROTO CHANGED 2\"");
+    A.prototype.a_stat = "PROTO CHANGED 2";
+    C.prototype.c_stat = "PROTO CHANGED 2";
+
+    print_dynstat(arr_inst, arr_name);
+
+    console.log("---");
+    console.log("=== INSTANCE b1 ===");
+    show_inst(b1);
+    console.log("=== INSTANCE b1.a_func() ===");
+    b1.a_func();
+    console.log("=== INSTANCE b1.b_func() ===");
+    b1.b_func();
+    console.log("---");
+    console.log("=== INSTANCE c1 ===");
+    show_inst(c1);
+    console.log("=== INSTANCE c1.a_func() ===");
+    c1.a_func();
+    console.log("=== INSTANCE c1.aa_func() ===");
+    c1.aa_func();
+    console.log("=== INSTANCE c1.callSuper aa_func() ===");
+    c1.callSuper("aa_func");
+    console.log("=== INSTANCE c1.c_func() ===");
+    c1.c_func();
+}
\ No newline at end of file
diff --git a/web/xynt-dd-test.js b/web/xynt-dd-test.js
new file mode 100644 (file)
index 0000000..3cc8e54
--- /dev/null
@@ -0,0 +1,8 @@
+function dropt1()
+{
+    ; //alert("t1");
+}
+window.onload = function() {
+    console.log("HT"+$('t1'));
+    xynt_dd.call($('t1'), dropt1, -1600, 1600, 10,10);   
+}
\ No newline at end of file
diff --git a/web/xynt-div-coord-test.js b/web/xynt-div-coord-test.js
new file mode 100644 (file)
index 0000000..f678f3f
--- /dev/null
@@ -0,0 +1,95 @@
+
+function dimension()
+{
+    //var w = getStyle(window.document.body, "width", "width");
+    //var h = getStyle(window.document.body, "height", "height");
+    var w = window.innerWidth;
+    var h = window.innerHeight;
+
+    console.log("W: "+w+" H: "+h);
+
+    $('board-drag').style.left    =  (parseInt(w) / 2 - 2)+"px";
+    $('board-drag').style.top     =  "0px";
+    /*$('board-drag').style.width   =  (10)+"px"; */
+    $('board-drag').style.height  =  (parseInt(h) - 2)+"px";
+
+    $('board').xynt_divcoo_hidescroll = 0;
+    $('board').style.top    =  "0px";
+    $('board').style.left   =  "0px";
+    // $('board').style.width  =  (parseInt(w) / 2 - 2)+"px";
+    $('board').style.height =  (parseInt(h) - 2)+"px";
+
+    $('board').style.width  = parseInt($('board-drag').style.left)+$('board').xynt_divcoo_hidescroll+"px";
+    if (parseInt($('board').style.width) > $('board').clientWidth) {
+        // alert("di qui");
+        $('board').xynt_divcoo_hidescroll = parseInt($('board').style.width) - $('board').clientWidth;
+        $('board').style.width  = parseInt($('board-drag').style.left)+$('board').xynt_divcoo_hidescroll+"px";
+        // $('board').style.width = (parseInt($('board').style.width) + $('board').xynt_divcoo_hidescroll)+"px";
+    }
+    
+    // $('board2').style.left    =  (parseInt(w) / 2 - 1 + parseInt($('board-drag').style.width))+"px";
+    $('board2').style.left  = parseInt($('board-drag').style.left)+parseInt($('board-drag').style.width)+1+"px";
+    $('board2').style.top     =  "0px";
+    $('board2').style.width = (w - (parseInt($('board-drag').style.left)+parseInt($('board-drag').style.width)+4))+"px";
+    // $('board2').style.width   =  (parseInt(w) / 2 - 2 - 10)+"px";
+    $('board2').style.height  =  (parseInt(h) - 2)+"px";
+
+    
+
+    var h1 = $('board2').clientHeight;
+    var h2 = $('board').clientHeight;
+    if (h1 > h2) {
+        $('board2').style.height = h2+"px";
+    }
+    else if (h2 > h1) {
+        $('board').style.height = h1+"px"; 
+    }
+
+    console.log($('board2').scrollTop);
+    $('board').scrollTop = $('board2').scrollTop;
+}
+
+
+function resize(event, obj)
+{
+    if (event == 'drag') {
+        var w = window.innerWidth;
+
+        $('board').style.width  = parseInt($('board-drag').style.left)-1+$('board').xynt_divcoo_hidescroll+"px";
+        $('board2').style.left  = parseInt($('board-drag').style.left)+parseInt($('board-drag').style.width)+1+"px";
+        $('board2').style.width = (w - (parseInt($('board-drag').style.left)+parseInt($('board-drag').style.width)+4))+"px";
+        console.log("conn_update: "+event);
+    }
+}
+    
+
+function scroll()
+{
+    // console.log("scroll");
+    // $('board').style.top = -parseInt($('board2').scrollTop)+"px";
+    $('board').scrollTop = $('board2').scrollTop;
+}
+
+function scroll2()
+{
+    // console.log("scroll2:");
+    $('board2').scrollTop = $('board').scrollTop;
+}
+
+function dropr1()
+{
+    ; //alert("t1");
+}
+
+window.onload = function () {
+    dimension();
+    $('board').xynt_conn_update = resize;
+    var ret = ExtendsInst($('board-drag'), xynt_dd, [ dropr1, -1600, 1600, 0,0 ]);
+    console.log("RET: "+ret);
+    console.log("xynt_conn_ect-v");
+    console.log($('board-drag').xynt_conn_ect);
+    $('board-drag').xynt_conn_ect($('board'));
+    // console.log($('board-drag'));
+    return;
+}
diff --git a/web/xynt/xynt-base.js b/web/xynt/xynt-base.js
new file mode 100644 (file)
index 0000000..de7cd25
--- /dev/null
@@ -0,0 +1,179 @@
+
+function Extends(sub)
+{
+    var proto;
+    thinF = function(){};
+    inh = new thinF();
+    inh.xynt_sup = [];
+    inh.xynt_sup_cl = [];
+
+    console.log("EXT START");
+
+    var multi = function(sub, super, is_last)
+    {
+        var proto = super.prototype;
+
+        for (var f in proto) {
+            if (f == "xynt_sup" || f == "xynt_sup_cl")
+                continue;
+
+            console.log("LOOP: "+f);
+            if( f != "constructor" && typeof(proto[f]) == "function" && !is_last){
+                console.log("M_FU: "+proto[f]+"  F: "+f);
+                // sub[f] = proto[f];
+                sub[f] = function() {
+                    // console.log("INFU PR: " + proto[f] + " FUNC: "+f+" THIS: " + this);
+                    console.log("SIMPLE LOG");
+                    return proto[f].apply(this,arguments);
+                }
+            }
+            else {
+                console.log("M_PR: "+proto.name+"  A: "+f+" FUN: "+proto[f]);
+                sub[f] = proto[f];
+            }
+        }
+    }
+
+    for( var i=1; i < arguments.length ; i++){
+        multi(inh, arguments[i], false);
+        inh.xynt_sup.push(arguments[i].prototype);
+        inh.xynt_sup_cl.push(arguments[i]);
+    }
+
+    multi(inh, sub, true);
+
+
+    inh.callSuper = function(fnc){
+        var len = this.xynt_sup_cl.length;
+        for ( var i=0 ; i<len ; i++) {
+            var super = this.xynt_sup_cl[i];
+            if( (fnc in  super.prototype) && (typeof super.prototype[fnc] == "function") ){
+                return super.prototype[fnc].apply(this,[].splice.call(arguments,1));
+            }
+        }
+        return null;
+    }
+
+    /*
+    inh.superrr = function(cl, method) {
+        console.log("xyx "+cl);
+        // console.log("xx"+arguments[0]);
+    //    return this.xynt_sup_cl[cl].method.apply(this,arguments.slice(2));
+    }
+    */
+    sub.prototype = inh;
+
+    console.log("EXT FINISH");
+}
+
+function ExtendsInst(sub)
+{
+    var proto, cl, args;
+    
+    console.log("INIZIO EXT INST");
+
+    var multi = function(sub, super, is_last)
+    {
+        var proto = super.prototype;
+
+        var single = function(sub, fun) {
+            var cur_fun = fun;
+            
+            sub[cur_fun] = function(){
+                // console.log("INFU PR: " + proto[f] + " FUNC: "+f+" THIS: " + this);
+                console.log("SIMPLE LOG INST: "+cur_fun);
+                console.log(proto[cur_fun]);
+                console.log(sub);
+                console.log(arguments);
+                return proto[cur_fun].apply(this, arguments);
+            }
+        };
+
+        if (typeof(sub.xynt_sup) == 'undefined')
+            sub.xynt_sup = new Array();
+        if (typeof(sub.xynt_sup_cl) == 'undefined')
+            sub.xynt_sup_cl = new Array();
+
+        for (var f in proto) {
+            /* NOTE: this allow potentially TO BREAK by the extending class
+               if we disable it we don't have a reason to keep the callSuper function,
+               I need to meditate on it */
+            if (f == "xynt_sup" || f == "xynt_sup_cl")
+                continue;
+            
+            console.log("ExtensInst::multi: "+f+" type: "+typeof(sub[f]));
+            if (typeof(sub[f]) != 'undefined') {
+                if (typeof(sub[f]) == typeof(proto[f]))
+                    continue;
+                console.log("MULTI: false1");
+                return false;
+            }
+
+            console.log("LOOP: "+f);
+            if( f != "constructor" && typeof(proto[f]) == "function" && !is_last){
+                console.log("M_FU: "+proto[f]+"  F: "+f);
+                single(sub, f);
+            }
+            else {
+                console.log("M_PR: "+proto.name+"  A: "+f+" FUN: "+proto[f]);
+                sub[f] = proto[f];
+            }
+        }
+        return true;
+    };
+
+    console.log("POST FUNC");
+
+    for( var i=1; i < arguments.length ; i++){
+        console.log("POST FUNC IN LOOP");
+        cl = arguments[i];
+        if (i+1 < arguments.length && typeof(arguments[i+1]) != 'function') {
+            i++;
+            args = arguments[i];
+        }
+        if (multi(sub, cl, false) == false) {
+            console.log("POST FUNC FALSE 1");
+            return (false);
+        }
+
+        console.log("POST FUNC PRE APPLY");
+        cl.apply(sub, args);
+        console.log("POST FUNC POST APPLY");
+
+        sub.xynt_sup.push(cl.prototype);
+        sub.xynt_sup_cl.push(cl);
+    }
+
+    sub.callSuper = function(fnc){
+        var len = this.xynt_sup_cl.length;
+        for ( var i=0 ; i<len ; i++) {
+            var super = this.xynt_sup_cl[i];
+            if( (fnc in  super.prototype) && (typeof super.prototype[fnc] == "function") ){
+                return super.prototype[fnc].apply(this,[].splice.call(arguments,1));
+            }
+        }
+        return null;
+    }
+
+    console.log("FINE EXT INST");
+    return true;
+}
+
+function show_class(cl) {
+    console.log("Attributes Class of "+cl);
+    for (f in cl.prototype) {
+        console.log(f+"-v");
+        console.log(cl.prototype[f]);
+    }
+    console.log("---");
+}
+
+function show_inst(inst) {
+    console.log("Attributes Instance of "+inst);
+    for (f in inst) {
+        console.log(f+"-v");
+        // console.log(inst[f]);
+    }
+    console.log("---");
+}
+
diff --git a/web/xynt/xynt-commons.js b/web/xynt/xynt-commons.js
new file mode 100644 (file)
index 0000000..cb8076f
--- /dev/null
@@ -0,0 +1,99 @@
+function $(id) { return document.getElementById(id); }
+
+function getStyle(x,IEstyleProp, MozStyleProp) 
+{
+    if (x.currentStyle) {
+        var y = x.currentStyle[IEstyleProp];
+    } else if (window.getComputedStyle) {
+        var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(MozStyleProp);
+    }
+    return y;
+}
+
+  /* replacement of setInterval on IE */
+(function(){
+    /*if not IE, do nothing*/
+    if(!document.uniqueID){return;};
+
+    /*Copy the default setInterval behavior*/
+    var nativeSetInterval = window.setInterval;
+    window.setInterval = function(fn,ms) {              
+        var param = [];
+        if(arguments.length <= 2)       {
+            return nativeSetInterval(fn,ms);
+        }
+        else {
+            for(var i=2;i<arguments.length;i+=1) {
+                param[i-2] =  arguments[i];
+            }   
+        }
+        
+        if(typeof(fn)=='function') {
+            
+            return (function (fn,ms,param) {
+                var fo = function () {                                                          
+                    fn.apply(window,param);
+                };                      
+                return nativeSetInterval(fo,ms); 
+            })(fn,ms,param);
+        }
+        else if(typeof(fn)=='string')
+        {
+            return  nativeSetInterval(fn,ms);
+        }
+        else
+        {
+            throw Error('setInterval Error\nInvalid function type');
+        };
+    };
+
+    /*Copy the default setTimeout behavior*/
+    var nativeSetTimeout = window.setTimeout;
+    window.setTimeout = function(fn,ms) {               
+        var param = [];
+        if(arguments.length <= 2)       {
+            return nativeSetTimeout(fn,ms);
+        }
+        else {
+            for(var i=2;i<arguments.length;i+=1) {
+                param[i-2] =  arguments[i];
+            }   
+        }
+        
+        if(typeof(fn)=='function') {
+            
+            return (function (fn,ms,param) {
+                var fo = function () {                                                          
+                    fn.apply(window,param);
+                };                      
+                return nativeSetTimeout(fo,ms); 
+            })(fn,ms,param);
+        }
+        else if(typeof(fn)=='string')
+        {
+            return  nativeSetTimeout(fn,ms);
+        }
+        else
+        {
+            throw Error('setTimeout Error\nInvalid function type');
+        };
+    };
+
+})()
+
+function getStyle(x,IEstyleProp, MozStyleProp) 
+{
+    if (x.currentStyle) {
+        var y = x.currentStyle[IEstyleProp];
+    } else if (window.getComputedStyle) {
+        var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(MozStyleProp);
+    }
+    return y;
+}
+
+function doSomething(e) {
+       if (!e) var e = window.event
+       // handle event
+       e.cancelBubble = true;
+       if (e.stopPropagation) e.stopPropagation();
+}
\ No newline at end of file
diff --git a/web/xynt/xynt-connect.js b/web/xynt/xynt-connect.js
new file mode 100644 (file)
index 0000000..d3b69f2
--- /dev/null
@@ -0,0 +1,12 @@
+function xynt_connect()
+{
+    console.log("MOP xynt_connect constructor");
+    this.xynt_conn_ected = new Array();
+}
+
+xynt_connect.prototype = {
+    xynt_conn_ect: function(obj) {
+        console.log("connected");
+        this.xynt_conn_ected[this.xynt_conn_ected.length] = obj;
+    }
+ }
diff --git a/web/xynt/xynt-console.js b/web/xynt/xynt-console.js
new file mode 100644 (file)
index 0000000..c4bf044
--- /dev/null
@@ -0,0 +1,137 @@
+function xynt_console(ena) {
+    var conbody, condiv;
+
+    this.enable = ena;
+    if (ena) {
+        this.win = window.open("","xynt console","navigation=no,scrollbars=yes,height=500,width=800,left=0,top=800");
+        // titl = this.win.document.createElement("title");
+        // titl.innerHTML = "xynt console";
+        conbody = this.win.document.createElement("body");
+        this.div = condiv = this.win.document.createElement("div");
+
+        conbody.id = "console_body";
+        // this.win.document.head.appendChild(titl);
+        this.win.document.body.appendChild(condiv);
+        this.win.document.title = "xynt console";
+    }
+}
+
+xynt_console.prototype = {
+    win: null,
+    div: null,
+    enable: false,
+
+    escapeHTML: function(s) {
+        var v = s+"";
+        return v.replace(/&/g,'&amp;').
+                replace(/ /g,'&nbsp;').
+                replace(/"/g,'&quot;').
+            // replace(/'/g,'&#039;').
+                replace(/>/g,'&gt;').
+                replace(/</g,'&lt;').                        
+                replace(/\n/g, "<br>\n");
+    },
+
+    log: function(s) {
+        if (!this.enable) {
+            return;
+        }
+        if (typeof(s) == "string" || typeof(s) == "function") {
+            this.div.innerHTML += this.escapeHTML(s);
+        }
+        else {
+            ind = 4;
+            this.dump_obj(s,ind);
+        }
+        this.div.innerHTML += "<hr style=\"height: 1px;\">\n";
+        this.win.document.body.scrollTop = 10000000;
+    },
+
+    dump_obj: function(s, ind) {
+        var sind = "";
+
+        sind = "<span style=\"background-color:#f0f0f0;\">";
+        for (i = 0 ; i < ind ; i++) {
+            sind += "&nbsp;";
+        }
+        sind += "</span>";
+        for (i in s) {
+            if (typeof(s[i]) == 'string' || typeof(s[i]) == "function") {
+                var ret = "";
+                var arr = this.escapeHTML(s[i]).split("\n");
+                for (el in arr) {
+                    ret += sind + arr[el] + "\n";
+                }
+                // this.div.innerHTML += "xx["+this.escapeHTML(i) + "] : [" + ret + "]<hr style=\"height: 1px; width: 100px;\"><br>\n";
+                this.div.innerHTML += this.escapeHTML(i)+"<br>\n";
+                this.div.innerHTML += ret + "<hr style=\"height: 1px; width: 100px;\"><br>\n";
+            }
+            else {
+                this.dump_obj(s[i], ind+4);
+            }
+        }       
+        // this.div.innerHTML += "post-loop<br>";
+    },
+
+    logger: function(s) {
+        if (!this.enable) {
+            return;
+        }
+        this.div.innerHTML += s + "<br>";
+        this.win.document.body.scrollTop = 10000000;
+    },
+
+    close: function() {
+        if (this.enable) {
+            this.win.close();
+        }
+    }
+}
+
+/*
+ *  create and destroy 
+ */
+var is_xynt_console = false;
+var console_enable = true;
+
+if(typeof(console) == "undefined") {
+    var console;
+    
+    console = new xynt_console(console_enable);
+
+    is_xynt_console = true;
+}
+else {
+    // conzole.logger = console.log;
+    // conzole.log = function () { return 0; }
+}
+
+function deconsole() {
+    if (is_xynt_console) {
+        console.close();
+    }
+}
+
+function log_walk(curtag)
+{
+    var ind = 0;
+    var ancestor = curtag;
+    do {
+        console.log(spcs("_", "+", ind)+" ["+curtag.tagName+"]  nodeType: "+curtag.nodeType+" inner: ["+curtag.innerHTML+"]");
+        if (curtag.firstChild != null && curtag.tagName != "TD") {
+            ind += 2;
+            curtag = curtag.firstChild;
+        }
+        else if (curtag.nextSibling != null) {
+            curtag = curtag.nextSibling;
+        }
+        else if (curtag.parentNode.nextSibling != null) {
+            ind -= 2;
+            curtag = curtag.parentNode.nextSibling;
+        }
+        else
+            curtag = null;
+    } while (curtag != null && curtag != ancestor);
+}
+
+
diff --git a/web/xynt/xynt-dd.js b/web/xynt/xynt-dd.js
new file mode 100644 (file)
index 0000000..f9eec36
--- /dev/null
@@ -0,0 +1,202 @@
+/*
+ *  brisk - dom-drag.js
+ *
+ *  Copyright (C) 2006-2011 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details. You should have received a
+ * copy of the GNU General Public License along with this program; if
+ * not, write to the Free Software Foundation, Inc, 59 Temple Place -
+ * Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+/**************************************************
+ * dom-drag.js
+ * 09.25.2001
+ * www.youngpup.net
+ **************************************************
+ * 10.28.2001 - fixed minor bug where events
+ * sometimes fired off the handle, not the root.
+ **************************************************/
+
+function xynt_dd(mouseup_cb, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
+{
+    xynt_connect.call(this);
+
+    this.onmousedown   = xynt_dd.prototype.start;
+    this.mouseup_cb    = mouseup_cb;
+
+    this.hmode = bSwapHorzRef ? false : true ;
+    this.vmode = bSwapVertRef ? false : true ;
+    
+    this.root = (this.xynt_dom_el && this.xynt_dom_el != null) ? this.xynt_dom_el : this ;
+    
+    if (this.hmode && isNaN(parseInt(this.root.style.left))) {
+        var res = parseInt(getStyle(o, "left", "left"));
+       if (isNaN(res)) {
+           this.root.style.left   = "0px";
+       }
+       else {
+           this.root.style.left   = res;
+       }
+    }
+    if (this.vmode  && isNaN(parseInt(this.root.style.top   ))) {
+        var res = parseInt(getStyle(o, "top", "top"));
+       if (isNaN(res)) {
+           this.root.style.top   = "0px";
+       }
+       else {
+           this.root.style.top   = res;
+       }
+    }
+    if (!this.hmode && isNaN(parseInt(this.root.style.right ))) this.root.style.right  = "0px";
+    if (!this.vmode && isNaN(parseInt(this.root.style.bottom))) this.root.style.bottom = "0px";
+    
+    this.minX  = typeof minX != 'undefined' ? minX : null;
+    this.minY  = typeof minY != 'undefined' ? minY : null;
+    this.maxX  = typeof maxX != 'undefined' ? maxX : null;
+    this.maxY  = typeof maxY != 'undefined' ? maxY : null;
+    
+    this.xMapper = fXMapper ? fXMapper : null;
+    this.yMapper = fYMapper ? fYMapper : null;
+    
+    this.root.onDragStart = new Function();
+    this.root.onDragEnd        = new Function();
+    this.root.onDrag = new Function();
+}
+
+xynt_dd.prototype = {
+
+    obj : null,
+
+    start : function(e)
+    {
+       var o = xynt_dd.obj = this;
+       e = xynt_dd.prototype.fixE(e);
+
+        if (!e) 
+            var e = window.event
+       // handle event
+       e.cancelBubble = true;
+       if (e.stopPropagation) 
+            e.stopPropagation();
+
+       o.oldzidx = o.style.zIndex;
+       o.style.zIndex = 10;
+
+       var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
+       var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
+       o.root.onDragStart(x, y);
+
+       o.lastMouseX    = e.clientX;
+       o.lastMouseY    = e.clientY;
+
+       if (o.hmode) {
+           if (o.minX != null) o.minMouseX     = e.clientX - x + o.minX;
+           if (o.maxX != null) o.maxMouseX     = o.minMouseX + o.maxX - o.minX;
+       } else {
+           if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
+           if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
+       }
+
+       if (o.vmode) {
+           if (o.minY != null) o.minMouseY     = e.clientY - y + o.minY;
+           if (o.maxY != null) o.maxMouseY     = o.minMouseY + o.maxY - o.minY;
+       } else {
+           if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
+           if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
+       }
+
+        // console.log("assign");
+       document.onmousemove    = xynt_dd.prototype.drag;
+       document.onmouseup      = xynt_dd.prototype.end;
+
+        for(var i = 0 ; i < o.xynt_conn_ected.length ; i++) {
+            o.xynt_conn_ected[i].xynt_conn_update('start', o);
+        }
+
+       return false;
+    },
+
+    drag : function(e)
+    {
+        e = xynt_dd.prototype.fixE(e);
+       var o = xynt_dd.obj;
+        
+       var ey  = e.clientY;
+       var ex  = e.clientX;
+       var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
+       var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
+       var nx, ny;
+
+       if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
+       if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
+       if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
+       if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);
+        
+       nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
+       ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
+
+       if (o.xMapper)          nx = o.xMapper(y)
+       else if (o.yMapper)     ny = o.yMapper(x)
+
+       xynt_dd.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
+       xynt_dd.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
+       xynt_dd.obj.lastMouseX  = ex;
+       xynt_dd.obj.lastMouseY  = ey;
+
+       xynt_dd.obj.root.onDrag(nx, ny);
+        
+        console.log("pre call it"+o.xynt_conn_ected.length);
+        for(var i = 0 ; i < o.xynt_conn_ected.length ; i++) {
+            console.log("call it");
+            o.xynt_conn_ected[i].xynt_conn_update('drag', o);
+        }
+        
+       return false;
+    },
+
+    end : function(e)
+    {
+       e = xynt_dd.prototype.fixE(e);
+       var o = xynt_dd.obj;
+
+       o.style.zIndex = o.oldzidx;
+       if (o.mouseup_cb != null) {
+           if (o.mouseup_cb(o) == 1) {
+               o.onmousedown = null;
+           }
+       }
+
+       document.onmousemove = null;
+       document.onmouseup   = null;
+       xynt_dd.obj.root.onDragEnd(     parseInt(xynt_dd.obj.root.style[xynt_dd.obj.hmode ? "left" : "right"]), 
+                                       parseInt(xynt_dd.obj.root.style[xynt_dd.obj.vmode ? "top" : "bottom"]));
+        for(var i = 0 ; i < o.xynt_conn_ected.length ; i++) {
+            o.xynt_conn_ected[i].xynt_conn_update('end', o);
+        }
+
+       xynt_dd.obj = null;
+    },
+
+    fixE : function(e)
+    {
+       if (typeof e == 'undefined') e = window.event;
+       if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
+       if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
+       return e;
+    }
+};
+
+Extends(xynt_dd, xynt_connect);
\ No newline at end of file
diff --git a/web/xynt/xynt-link.js b/web/xynt/xynt-link.js
new file mode 100644 (file)
index 0000000..12ae9c1
--- /dev/null
@@ -0,0 +1,95 @@
+function tasks_link(anc, a, b, type) {
+    var cur;
+    this.anc = anc;
+    this.o   = document.createElement("div");
+    this.o.style.top  = "0px";
+    this.o.style.left = "0px";
+    this.o.style.position = "absolute";
+    this.o.style.visibility = "hidden";
+    this.beg = document.createElement("div");
+    this.end = document.createElement("div");
+    this.arr = document.createElement("img");
+    this.arr.style.position = "absolute";
+    this.o.appendChild(this.arr);
+    this.anc.appendChild(this.o);
+    for (var i = 0 ; i < 2 ; i++) {
+        cur = i == 0 ? this.beg : this.end;
+        cur.style.width = '5px';
+        cur.style.height = '5px';
+        cur.style.backgroundColor = 'gray';
+        cur.style.visibility = 'inherit';
+        cur.style.zIndex = 20;
+        cur.style.position = 'absolute';
+        this.o.appendChild(cur);
+        // alert("gugu");
+    }
+    
+    this.a = a;
+    this.b = b;
+    this.type = type;
+
+    if (typeof(a.connected) != 'object')
+        return null;
+
+    if (typeof(b.connected) != 'object')
+        return null;
+
+    for (var i = 0 ; i < 2 ; i++) {
+        cur = (i == 0 ? a : b);
+        cur.connected[cur.connected.length++] = this;
+        for( ; cur.parentNode != null && cur.parentNode != anc ; cur = cur.parentNode) {
+            cur.connect(this);
+        }
+    }
+    this.update()
+}
+
+tasks_link.prototype = {
+    a: null,
+    b: null,
+    type: null,
+
+    update: function(method, obj)
+    {
+        /*
+        if (method == 'end') {
+            if (this.o.style.visibility == 'visible')
+                this.o.style.visibility = 'hidden';
+            else
+                this.o.style.visibility = 'visible';
+        }
+        */
+        
+        // FIXME you need to user the width of the border instead of +2
+        this.beg.style.left = (parseInt(this.a.style.left) + parseInt(this.a.style.width) + 2 + parseInt(this.a.parentNode.style.left))+"px";
+        this.beg.style.top  = (parseInt(this.a.style.top)  + parseInt(((parseInt(this.a.style.height) + 2) / 2)) + parseInt(this.a.parentNode.style.top))+"px";
+        this.beg.style.width = (parseInt(this.b.style.left) - (parseInt(this.a.style.left) + 2 + parseInt(this.b.style.width) + 2)+ parseInt(this.b.parentNode.style.left) + 5)+"px";
+        this.beg.style.height = "1px";
+
+        this.end.style.left = (parseInt(this.beg.style.left) + parseInt(this.beg.style.width))+"px";
+        this.arr.style.left = (parseInt(this.end.style.left) - 3)+"px";
+        /* this.end.style.left = (parseInt(this.b.style.left) + parseInt(this.b.parentNode.style.left))+"px";
+           this.end.style.top  = (parseInt(this.b.style.top)  + parseInt(this.b.parentNode.style.top))+"px"; */
+        endpty = parseInt(this.b.style.top)  + parseInt(this.b.parentNode.style.top)+10;
+        this.end.style.width  = "1px";
+        
+        if (parseInt(this.beg.style.top) < endpty) {
+            this.end.style.top  = this.beg.style.top;
+            this.end.style.height = (parseInt(this.b.style.top)  + parseInt(this.b.parentNode.style.top) - ((parseInt(this.a.style.top)  + parseInt(this.a.parentNode.style.top))) ) - 11 +"px";
+            this.arr.style.top = (parseInt(this.end.style.top) + parseInt(this.end.style.height) - 5)+"px";
+            this.arr.src = "img/arrow_do.png";
+        }
+        else {
+            this.end.style.top  = (parseInt(this.b.style.top)  + parseInt(this.b.parentNode.style.top) + 23)+"px";
+            this.end.style.height = (parseInt(this.a.style.top)  + parseInt(this.a.parentNode.style.top) - ((parseInt(this.b.style.top)  + parseInt(this.b.parentNode.style.top))) ) - 11 +"px";
+
+            this.arr.style.top = this.end.style.top;
+            this.arr.src = "img/arrow_up.png";
+        }
+
+
+        this.o.style.visibility = "visible";
+        
+        console.log("met: " + method + " obj: " + (obj == this.a ? "Obj A" : (obj == this.b ? "Obj B" : "Other")) );
+    }
+}
diff --git a/xynt-base-test.js b/xynt-base-test.js
deleted file mode 100644 (file)
index 2b45c79..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-function A(a, b) {
-    this.a_dyn = "A DYN";
-    this.a = a;
-    this.b = b;
-}
-
-A.prototype = {
-    a_stat: "A STAT",
-
-    a_func: function () {
-        console.log("a_func run");
-    },
-    aa_func: function () {
-        console.log("aa_func run in A class");
-    }
-}
-
-function B(a, b) {
-    this.b_dyn = "B DYN";
-    A.call(this, a, b);
-}
-
-B.prototype = {
-    b_stat: "B STAT",
-
-    a_func: function () {
-        console.log("a_func run from B");
-        console.log("and now try to call the super method");
-        this.callSuper("a_func");
-    },
-
-    b_func: function () {
-        console.log("b_func run");
-    }
-}
-function C() {
-    this.c_dyn = "C DYN";
-}
-
-C.prototype = {
-    c_stat: "C STAT",
-
-    aa_func: function () {
-        console.log("aa_func run in C class");
-    },
-
-    c_func: function () {
-        console.log("c_func run");
-    }
-}
-
-Extends(B, A);
-
-function print_dynstat(inst, name)
-{
-    for (i = 0 ; i < inst.length ; i++) {
-        console.log(name[i]+".a_dyn: "+inst[i].a_dyn);
-        console.log(name[i]+".a_stat: "+inst[i].a_stat);
-        if (name[i][0] == 'b') {
-            console.log(name[i]+".b_dyn: "+inst[i].b_dyn);
-            console.log(name[i]+".b_stat: "+inst[i].b_stat);
-        }
-        if (name[i][0] == 'c') {
-            console.log(name[i]+".c_dyn: "+inst[i].c_dyn);
-            console.log(name[i]+".c_stat: "+inst[i].c_stat);
-        }
-    }
-}
-
-window.onload = function () {
-    console.log("Window.onload: begin");
-    show_class(A);
-    show_class(B);
-    show_class(C);
-
-    a1 = new A(1,2);
-    a2 = new A(3,4);
-    b1 = new B(5,6);
-    c1 = new C();
-
-    arr_inst = [  a1 ,  a2 ,  b1 ,  c1  ];
-    arr_name = [ "a1", "a2", "b1", "c1" ];
-
-    print_dynstat(arr_inst, arr_name);
-
-    console.log("---");
-    console.log("ACTION: a1.a_stat = \"CHANGED\";");
-    a1.a_stat = "CHANGED";
-
-    print_dynstat(arr_inst, arr_name);
-
-    console.log("---");
-    console.log("ACTION: A.prototype.a_stat = \"PROTO CHANGED\"");
-    A.prototype.a_stat = "PROTO CHANGED";
-
-    print_dynstat(arr_inst, arr_name);
-
-    console.log("---");
-    console.log("ACTION: ExtendsInst(c1, A, [1, 33])");
-
-    var ext = ExtendsInst(c1, A, [1, 33]);
-    console.log("ExtInst: "+(ext == true ? "TRUE" : "FALSE"));
-// } function azaz() {
-    print_dynstat(arr_inst, arr_name);
-
-    console.log("---");
-    console.log("ACTION: B.prototype.a_stat = \"PROTO CHANGED\"");
-    B.prototype.a_stat = "PROTO CHANGED";
-
-    print_dynstat(arr_inst, arr_name);
-
-    console.log("---");
-    console.log("ACTION: A.prototype.a_stat = \"PROTO CHANGED 2\"");
-    console.log("ACTION: C.prototype.c_stat = \"PROTO CHANGED 2\"");
-    A.prototype.a_stat = "PROTO CHANGED 2";
-    C.prototype.c_stat = "PROTO CHANGED 2";
-
-    print_dynstat(arr_inst, arr_name);
-
-    console.log("---");
-    console.log("=== INSTANCE b1 ===");
-    show_inst(b1);
-    console.log("=== INSTANCE b1.a_func() ===");
-    b1.a_func();
-    console.log("=== INSTANCE b1.b_func() ===");
-    b1.b_func();
-    console.log("---");
-    console.log("=== INSTANCE c1 ===");
-    show_inst(c1);
-    console.log("=== INSTANCE c1.a_func() ===");
-    c1.a_func();
-    console.log("=== INSTANCE c1.aa_func() ===");
-    c1.aa_func();
-    console.log("=== INSTANCE c1.callSuper aa_func() ===");
-    c1.callSuper("aa_func");
-    console.log("=== INSTANCE c1.c_func() ===");
-    c1.c_func();
-}
\ No newline at end of file
diff --git a/xynt-base.js b/xynt-base.js
deleted file mode 100644 (file)
index de7cd25..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-
-function Extends(sub)
-{
-    var proto;
-    thinF = function(){};
-    inh = new thinF();
-    inh.xynt_sup = [];
-    inh.xynt_sup_cl = [];
-
-    console.log("EXT START");
-
-    var multi = function(sub, super, is_last)
-    {
-        var proto = super.prototype;
-
-        for (var f in proto) {
-            if (f == "xynt_sup" || f == "xynt_sup_cl")
-                continue;
-
-            console.log("LOOP: "+f);
-            if( f != "constructor" && typeof(proto[f]) == "function" && !is_last){
-                console.log("M_FU: "+proto[f]+"  F: "+f);
-                // sub[f] = proto[f];
-                sub[f] = function() {
-                    // console.log("INFU PR: " + proto[f] + " FUNC: "+f+" THIS: " + this);
-                    console.log("SIMPLE LOG");
-                    return proto[f].apply(this,arguments);
-                }
-            }
-            else {
-                console.log("M_PR: "+proto.name+"  A: "+f+" FUN: "+proto[f]);
-                sub[f] = proto[f];
-            }
-        }
-    }
-
-    for( var i=1; i < arguments.length ; i++){
-        multi(inh, arguments[i], false);
-        inh.xynt_sup.push(arguments[i].prototype);
-        inh.xynt_sup_cl.push(arguments[i]);
-    }
-
-    multi(inh, sub, true);
-
-
-    inh.callSuper = function(fnc){
-        var len = this.xynt_sup_cl.length;
-        for ( var i=0 ; i<len ; i++) {
-            var super = this.xynt_sup_cl[i];
-            if( (fnc in  super.prototype) && (typeof super.prototype[fnc] == "function") ){
-                return super.prototype[fnc].apply(this,[].splice.call(arguments,1));
-            }
-        }
-        return null;
-    }
-
-    /*
-    inh.superrr = function(cl, method) {
-        console.log("xyx "+cl);
-        // console.log("xx"+arguments[0]);
-    //    return this.xynt_sup_cl[cl].method.apply(this,arguments.slice(2));
-    }
-    */
-    sub.prototype = inh;
-
-    console.log("EXT FINISH");
-}
-
-function ExtendsInst(sub)
-{
-    var proto, cl, args;
-    
-    console.log("INIZIO EXT INST");
-
-    var multi = function(sub, super, is_last)
-    {
-        var proto = super.prototype;
-
-        var single = function(sub, fun) {
-            var cur_fun = fun;
-            
-            sub[cur_fun] = function(){
-                // console.log("INFU PR: " + proto[f] + " FUNC: "+f+" THIS: " + this);
-                console.log("SIMPLE LOG INST: "+cur_fun);
-                console.log(proto[cur_fun]);
-                console.log(sub);
-                console.log(arguments);
-                return proto[cur_fun].apply(this, arguments);
-            }
-        };
-
-        if (typeof(sub.xynt_sup) == 'undefined')
-            sub.xynt_sup = new Array();
-        if (typeof(sub.xynt_sup_cl) == 'undefined')
-            sub.xynt_sup_cl = new Array();
-
-        for (var f in proto) {
-            /* NOTE: this allow potentially TO BREAK by the extending class
-               if we disable it we don't have a reason to keep the callSuper function,
-               I need to meditate on it */
-            if (f == "xynt_sup" || f == "xynt_sup_cl")
-                continue;
-            
-            console.log("ExtensInst::multi: "+f+" type: "+typeof(sub[f]));
-            if (typeof(sub[f]) != 'undefined') {
-                if (typeof(sub[f]) == typeof(proto[f]))
-                    continue;
-                console.log("MULTI: false1");
-                return false;
-            }
-
-            console.log("LOOP: "+f);
-            if( f != "constructor" && typeof(proto[f]) == "function" && !is_last){
-                console.log("M_FU: "+proto[f]+"  F: "+f);
-                single(sub, f);
-            }
-            else {
-                console.log("M_PR: "+proto.name+"  A: "+f+" FUN: "+proto[f]);
-                sub[f] = proto[f];
-            }
-        }
-        return true;
-    };
-
-    console.log("POST FUNC");
-
-    for( var i=1; i < arguments.length ; i++){
-        console.log("POST FUNC IN LOOP");
-        cl = arguments[i];
-        if (i+1 < arguments.length && typeof(arguments[i+1]) != 'function') {
-            i++;
-            args = arguments[i];
-        }
-        if (multi(sub, cl, false) == false) {
-            console.log("POST FUNC FALSE 1");
-            return (false);
-        }
-
-        console.log("POST FUNC PRE APPLY");
-        cl.apply(sub, args);
-        console.log("POST FUNC POST APPLY");
-
-        sub.xynt_sup.push(cl.prototype);
-        sub.xynt_sup_cl.push(cl);
-    }
-
-    sub.callSuper = function(fnc){
-        var len = this.xynt_sup_cl.length;
-        for ( var i=0 ; i<len ; i++) {
-            var super = this.xynt_sup_cl[i];
-            if( (fnc in  super.prototype) && (typeof super.prototype[fnc] == "function") ){
-                return super.prototype[fnc].apply(this,[].splice.call(arguments,1));
-            }
-        }
-        return null;
-    }
-
-    console.log("FINE EXT INST");
-    return true;
-}
-
-function show_class(cl) {
-    console.log("Attributes Class of "+cl);
-    for (f in cl.prototype) {
-        console.log(f+"-v");
-        console.log(cl.prototype[f]);
-    }
-    console.log("---");
-}
-
-function show_inst(inst) {
-    console.log("Attributes Instance of "+inst);
-    for (f in inst) {
-        console.log(f+"-v");
-        // console.log(inst[f]);
-    }
-    console.log("---");
-}
-
diff --git a/xynt-connect.js b/xynt-connect.js
deleted file mode 100644 (file)
index d3b69f2..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-function xynt_connect()
-{
-    console.log("MOP xynt_connect constructor");
-    this.xynt_conn_ected = new Array();
-}
-
-xynt_connect.prototype = {
-    xynt_conn_ect: function(obj) {
-        console.log("connected");
-        this.xynt_conn_ected[this.xynt_conn_ected.length] = obj;
-    }
- }
diff --git a/xynt-console.js b/xynt-console.js
deleted file mode 100644 (file)
index 573e1f3..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-function xynt_console(ena) {
-    var conbody, condiv;
-
-    this.enable = ena;
-    if (ena) {
-        this.win = window.open("","xynt console","navigation=no,scrollbars=yes,height=500,width=800,left=0,top=800");
-        // titl = this.win.document.createElement("title");
-        // titl.innerHTML = "xynt console";
-        conbody = this.win.document.createElement("body");
-        this.div = condiv = this.win.document.createElement("div");
-
-        conbody.id = "console_body";
-        // this.win.document.head.appendChild(titl);
-        this.win.document.body.appendChild(condiv);
-        this.win.document.title = "xynt console";
-    }
-}
-
-xynt_console.prototype = {
-    win: null,
-    div: null,
-    enable: false,
-
-    escapeHTML: function(s) {
-        var v = s+"";
-        return v.replace(/&/g,'&amp;').
-                replace(/ /g,'&nbsp;').
-                replace(/"/g,'&quot;').
-            // replace(/'/g,'&#039;').
-                replace(/>/g,'&gt;').
-                replace(/</g,'&lt;').                        
-                replace(/\n/g, "<br>\n");
-    },
-
-    log: function(s) {
-        if (!this.enable) {
-            return;
-        }
-        if (typeof(s) == "string" || typeof(s) == "function") {
-            this.div.innerHTML += this.escapeHTML(s);
-        }
-        else {
-            ind = 4;
-            this.dump_obj(s,ind);
-        }
-        this.div.innerHTML += "<hr style=\"height: 1px;\">\n";
-        this.win.document.body.scrollTop = 10000000;
-    },
-
-    dump_obj: function(s, ind) {
-        var sind = "";
-
-        sind = "<span style=\"background-color:#f0f0f0;\">";
-        for (i = 0 ; i < ind ; i++) {
-            sind += "&nbsp;";
-        }
-        sind += "</span>";
-        for (i in s) {
-            if (typeof(s[i]) == 'string' || typeof(s[i]) == "function") {
-                var ret = "";
-                var arr = this.escapeHTML(s[i]).split("\n");
-                for (el in arr) {
-                    ret += sind + arr[el] + "\n";
-                }
-                // this.div.innerHTML += "xx["+this.escapeHTML(i) + "] : [" + ret + "]<hr style=\"height: 1px; width: 100px;\"><br>\n";
-                this.div.innerHTML += this.escapeHTML(i)+"<br>\n";
-                this.div.innerHTML += ret + "<hr style=\"height: 1px; width: 100px;\"><br>\n";
-            }
-            else {
-                this.dump_obj(s[i], ind+4);
-            }
-        }       
-        // this.div.innerHTML += "post-loop<br>";
-    },
-
-    logger: function(s) {
-        if (!this.enable) {
-            return;
-        }
-        this.div.innerHTML += s + "<br>";
-        this.win.document.body.scrollTop = 10000000;
-    },
-
-    close: function() {
-        if (this.enable) {
-            this.win.close();
-        }
-    }
-}
-
-/*
- *  create and destroy 
- */
-var is_xynt_console = false;
-var console_enable = true;
-
-if(typeof(console) == "undefined") {
-    var console;
-    
-    console = new xynt_console(console_enable);
-
-    is_xynt_console = true;
-}
-else {
-    // console.logger = console.log;
-    // console.log = function () { return 0; }
-}
-
-function deconsole() {
-    if (is_xynt_console) {
-        console.close();
-    }
-}
-
-function log_walk(curtag)
-{
-    var ind = 0;
-    var ancestor = curtag;
-    do {
-        console.log(spcs("_", "+", ind)+" ["+curtag.tagName+"]  nodeType: "+curtag.nodeType+" inner: ["+curtag.innerHTML+"]");
-        if (curtag.firstChild != null && curtag.tagName != "TD") {
-            ind += 2;
-            curtag = curtag.firstChild;
-        }
-        else if (curtag.nextSibling != null) {
-            curtag = curtag.nextSibling;
-        }
-        else if (curtag.parentNode.nextSibling != null) {
-            ind -= 2;
-            curtag = curtag.parentNode.nextSibling;
-        }
-        else
-            curtag = null;
-    } while (curtag != null && curtag != ancestor);
-}
-
-
diff --git a/xynt-dd-test.js b/xynt-dd-test.js
deleted file mode 100644 (file)
index 3cc8e54..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-function dropt1()
-{
-    ; //alert("t1");
-}
-window.onload = function() {
-    console.log("HT"+$('t1'));
-    xynt_dd.call($('t1'), dropt1, -1600, 1600, 10,10);   
-}
\ No newline at end of file
diff --git a/xynt-dd.js b/xynt-dd.js
deleted file mode 100644 (file)
index f9eec36..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- *  brisk - dom-drag.js
- *
- *  Copyright (C) 2006-2011 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details. You should have received a
- * copy of the GNU General Public License along with this program; if
- * not, write to the Free Software Foundation, Inc, 59 Temple Place -
- * Suite 330, Boston, MA 02111-1307, USA.
- *
- */
-
-/**************************************************
- * dom-drag.js
- * 09.25.2001
- * www.youngpup.net
- **************************************************
- * 10.28.2001 - fixed minor bug where events
- * sometimes fired off the handle, not the root.
- **************************************************/
-
-function xynt_dd(mouseup_cb, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
-{
-    xynt_connect.call(this);
-
-    this.onmousedown   = xynt_dd.prototype.start;
-    this.mouseup_cb    = mouseup_cb;
-
-    this.hmode = bSwapHorzRef ? false : true ;
-    this.vmode = bSwapVertRef ? false : true ;
-    
-    this.root = (this.xynt_dom_el && this.xynt_dom_el != null) ? this.xynt_dom_el : this ;
-    
-    if (this.hmode && isNaN(parseInt(this.root.style.left))) {
-        var res = parseInt(getStyle(o, "left", "left"));
-       if (isNaN(res)) {
-           this.root.style.left   = "0px";
-       }
-       else {
-           this.root.style.left   = res;
-       }
-    }
-    if (this.vmode  && isNaN(parseInt(this.root.style.top   ))) {
-        var res = parseInt(getStyle(o, "top", "top"));
-       if (isNaN(res)) {
-           this.root.style.top   = "0px";
-       }
-       else {
-           this.root.style.top   = res;
-       }
-    }
-    if (!this.hmode && isNaN(parseInt(this.root.style.right ))) this.root.style.right  = "0px";
-    if (!this.vmode && isNaN(parseInt(this.root.style.bottom))) this.root.style.bottom = "0px";
-    
-    this.minX  = typeof minX != 'undefined' ? minX : null;
-    this.minY  = typeof minY != 'undefined' ? minY : null;
-    this.maxX  = typeof maxX != 'undefined' ? maxX : null;
-    this.maxY  = typeof maxY != 'undefined' ? maxY : null;
-    
-    this.xMapper = fXMapper ? fXMapper : null;
-    this.yMapper = fYMapper ? fYMapper : null;
-    
-    this.root.onDragStart = new Function();
-    this.root.onDragEnd        = new Function();
-    this.root.onDrag = new Function();
-}
-
-xynt_dd.prototype = {
-
-    obj : null,
-
-    start : function(e)
-    {
-       var o = xynt_dd.obj = this;
-       e = xynt_dd.prototype.fixE(e);
-
-        if (!e) 
-            var e = window.event
-       // handle event
-       e.cancelBubble = true;
-       if (e.stopPropagation) 
-            e.stopPropagation();
-
-       o.oldzidx = o.style.zIndex;
-       o.style.zIndex = 10;
-
-       var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
-       var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
-       o.root.onDragStart(x, y);
-
-       o.lastMouseX    = e.clientX;
-       o.lastMouseY    = e.clientY;
-
-       if (o.hmode) {
-           if (o.minX != null) o.minMouseX     = e.clientX - x + o.minX;
-           if (o.maxX != null) o.maxMouseX     = o.minMouseX + o.maxX - o.minX;
-       } else {
-           if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
-           if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
-       }
-
-       if (o.vmode) {
-           if (o.minY != null) o.minMouseY     = e.clientY - y + o.minY;
-           if (o.maxY != null) o.maxMouseY     = o.minMouseY + o.maxY - o.minY;
-       } else {
-           if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
-           if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
-       }
-
-        // console.log("assign");
-       document.onmousemove    = xynt_dd.prototype.drag;
-       document.onmouseup      = xynt_dd.prototype.end;
-
-        for(var i = 0 ; i < o.xynt_conn_ected.length ; i++) {
-            o.xynt_conn_ected[i].xynt_conn_update('start', o);
-        }
-
-       return false;
-    },
-
-    drag : function(e)
-    {
-        e = xynt_dd.prototype.fixE(e);
-       var o = xynt_dd.obj;
-        
-       var ey  = e.clientY;
-       var ex  = e.clientX;
-       var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
-       var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
-       var nx, ny;
-
-       if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
-       if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
-       if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
-       if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);
-        
-       nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
-       ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
-
-       if (o.xMapper)          nx = o.xMapper(y)
-       else if (o.yMapper)     ny = o.yMapper(x)
-
-       xynt_dd.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
-       xynt_dd.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
-       xynt_dd.obj.lastMouseX  = ex;
-       xynt_dd.obj.lastMouseY  = ey;
-
-       xynt_dd.obj.root.onDrag(nx, ny);
-        
-        console.log("pre call it"+o.xynt_conn_ected.length);
-        for(var i = 0 ; i < o.xynt_conn_ected.length ; i++) {
-            console.log("call it");
-            o.xynt_conn_ected[i].xynt_conn_update('drag', o);
-        }
-        
-       return false;
-    },
-
-    end : function(e)
-    {
-       e = xynt_dd.prototype.fixE(e);
-       var o = xynt_dd.obj;
-
-       o.style.zIndex = o.oldzidx;
-       if (o.mouseup_cb != null) {
-           if (o.mouseup_cb(o) == 1) {
-               o.onmousedown = null;
-           }
-       }
-
-       document.onmousemove = null;
-       document.onmouseup   = null;
-       xynt_dd.obj.root.onDragEnd(     parseInt(xynt_dd.obj.root.style[xynt_dd.obj.hmode ? "left" : "right"]), 
-                                       parseInt(xynt_dd.obj.root.style[xynt_dd.obj.vmode ? "top" : "bottom"]));
-        for(var i = 0 ; i < o.xynt_conn_ected.length ; i++) {
-            o.xynt_conn_ected[i].xynt_conn_update('end', o);
-        }
-
-       xynt_dd.obj = null;
-    },
-
-    fixE : function(e)
-    {
-       if (typeof e == 'undefined') e = window.event;
-       if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
-       if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
-       return e;
-    }
-};
-
-Extends(xynt_dd, xynt_connect);
\ No newline at end of file
diff --git a/xynt-div-coord-test.js b/xynt-div-coord-test.js
deleted file mode 100644 (file)
index f678f3f..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-
-function dimension()
-{
-    //var w = getStyle(window.document.body, "width", "width");
-    //var h = getStyle(window.document.body, "height", "height");
-    var w = window.innerWidth;
-    var h = window.innerHeight;
-
-    console.log("W: "+w+" H: "+h);
-
-    $('board-drag').style.left    =  (parseInt(w) / 2 - 2)+"px";
-    $('board-drag').style.top     =  "0px";
-    /*$('board-drag').style.width   =  (10)+"px"; */
-    $('board-drag').style.height  =  (parseInt(h) - 2)+"px";
-
-    $('board').xynt_divcoo_hidescroll = 0;
-    $('board').style.top    =  "0px";
-    $('board').style.left   =  "0px";
-    // $('board').style.width  =  (parseInt(w) / 2 - 2)+"px";
-    $('board').style.height =  (parseInt(h) - 2)+"px";
-
-    $('board').style.width  = parseInt($('board-drag').style.left)+$('board').xynt_divcoo_hidescroll+"px";
-    if (parseInt($('board').style.width) > $('board').clientWidth) {
-        // alert("di qui");
-        $('board').xynt_divcoo_hidescroll = parseInt($('board').style.width) - $('board').clientWidth;
-        $('board').style.width  = parseInt($('board-drag').style.left)+$('board').xynt_divcoo_hidescroll+"px";
-        // $('board').style.width = (parseInt($('board').style.width) + $('board').xynt_divcoo_hidescroll)+"px";
-    }
-    
-    // $('board2').style.left    =  (parseInt(w) / 2 - 1 + parseInt($('board-drag').style.width))+"px";
-    $('board2').style.left  = parseInt($('board-drag').style.left)+parseInt($('board-drag').style.width)+1+"px";
-    $('board2').style.top     =  "0px";
-    $('board2').style.width = (w - (parseInt($('board-drag').style.left)+parseInt($('board-drag').style.width)+4))+"px";
-    // $('board2').style.width   =  (parseInt(w) / 2 - 2 - 10)+"px";
-    $('board2').style.height  =  (parseInt(h) - 2)+"px";
-
-    
-
-    var h1 = $('board2').clientHeight;
-    var h2 = $('board').clientHeight;
-    if (h1 > h2) {
-        $('board2').style.height = h2+"px";
-    }
-    else if (h2 > h1) {
-        $('board').style.height = h1+"px"; 
-    }
-
-    console.log($('board2').scrollTop);
-    $('board').scrollTop = $('board2').scrollTop;
-}
-
-
-function resize(event, obj)
-{
-    if (event == 'drag') {
-        var w = window.innerWidth;
-
-        $('board').style.width  = parseInt($('board-drag').style.left)-1+$('board').xynt_divcoo_hidescroll+"px";
-        $('board2').style.left  = parseInt($('board-drag').style.left)+parseInt($('board-drag').style.width)+1+"px";
-        $('board2').style.width = (w - (parseInt($('board-drag').style.left)+parseInt($('board-drag').style.width)+4))+"px";
-        console.log("conn_update: "+event);
-    }
-}
-    
-
-function scroll()
-{
-    // console.log("scroll");
-    // $('board').style.top = -parseInt($('board2').scrollTop)+"px";
-    $('board').scrollTop = $('board2').scrollTop;
-}
-
-function scroll2()
-{
-    // console.log("scroll2:");
-    $('board2').scrollTop = $('board').scrollTop;
-}
-
-function dropr1()
-{
-    ; //alert("t1");
-}
-
-window.onload = function () {
-    dimension();
-    $('board').xynt_conn_update = resize;
-    var ret = ExtendsInst($('board-drag'), xynt_dd, [ dropr1, -1600, 1600, 0,0 ]);
-    console.log("RET: "+ret);
-    console.log("xynt_conn_ect-v");
-    console.log($('board-drag').xynt_conn_ect);
-    $('board-drag').xynt_conn_ect($('board'));
-    // console.log($('board-drag'));
-    return;
-}
diff --git a/xynt-link.js b/xynt-link.js
deleted file mode 100644 (file)
index 12ae9c1..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-function tasks_link(anc, a, b, type) {
-    var cur;
-    this.anc = anc;
-    this.o   = document.createElement("div");
-    this.o.style.top  = "0px";
-    this.o.style.left = "0px";
-    this.o.style.position = "absolute";
-    this.o.style.visibility = "hidden";
-    this.beg = document.createElement("div");
-    this.end = document.createElement("div");
-    this.arr = document.createElement("img");
-    this.arr.style.position = "absolute";
-    this.o.appendChild(this.arr);
-    this.anc.appendChild(this.o);
-    for (var i = 0 ; i < 2 ; i++) {
-        cur = i == 0 ? this.beg : this.end;
-        cur.style.width = '5px';
-        cur.style.height = '5px';
-        cur.style.backgroundColor = 'gray';
-        cur.style.visibility = 'inherit';
-        cur.style.zIndex = 20;
-        cur.style.position = 'absolute';
-        this.o.appendChild(cur);
-        // alert("gugu");
-    }
-    
-    this.a = a;
-    this.b = b;
-    this.type = type;
-
-    if (typeof(a.connected) != 'object')
-        return null;
-
-    if (typeof(b.connected) != 'object')
-        return null;
-
-    for (var i = 0 ; i < 2 ; i++) {
-        cur = (i == 0 ? a : b);
-        cur.connected[cur.connected.length++] = this;
-        for( ; cur.parentNode != null && cur.parentNode != anc ; cur = cur.parentNode) {
-            cur.connect(this);
-        }
-    }
-    this.update()
-}
-
-tasks_link.prototype = {
-    a: null,
-    b: null,
-    type: null,
-
-    update: function(method, obj)
-    {
-        /*
-        if (method == 'end') {
-            if (this.o.style.visibility == 'visible')
-                this.o.style.visibility = 'hidden';
-            else
-                this.o.style.visibility = 'visible';
-        }
-        */
-        
-        // FIXME you need to user the width of the border instead of +2
-        this.beg.style.left = (parseInt(this.a.style.left) + parseInt(this.a.style.width) + 2 + parseInt(this.a.parentNode.style.left))+"px";
-        this.beg.style.top  = (parseInt(this.a.style.top)  + parseInt(((parseInt(this.a.style.height) + 2) / 2)) + parseInt(this.a.parentNode.style.top))+"px";
-        this.beg.style.width = (parseInt(this.b.style.left) - (parseInt(this.a.style.left) + 2 + parseInt(this.b.style.width) + 2)+ parseInt(this.b.parentNode.style.left) + 5)+"px";
-        this.beg.style.height = "1px";
-
-        this.end.style.left = (parseInt(this.beg.style.left) + parseInt(this.beg.style.width))+"px";
-        this.arr.style.left = (parseInt(this.end.style.left) - 3)+"px";
-        /* this.end.style.left = (parseInt(this.b.style.left) + parseInt(this.b.parentNode.style.left))+"px";
-           this.end.style.top  = (parseInt(this.b.style.top)  + parseInt(this.b.parentNode.style.top))+"px"; */
-        endpty = parseInt(this.b.style.top)  + parseInt(this.b.parentNode.style.top)+10;
-        this.end.style.width  = "1px";
-        
-        if (parseInt(this.beg.style.top) < endpty) {
-            this.end.style.top  = this.beg.style.top;
-            this.end.style.height = (parseInt(this.b.style.top)  + parseInt(this.b.parentNode.style.top) - ((parseInt(this.a.style.top)  + parseInt(this.a.parentNode.style.top))) ) - 11 +"px";
-            this.arr.style.top = (parseInt(this.end.style.top) + parseInt(this.end.style.height) - 5)+"px";
-            this.arr.src = "img/arrow_do.png";
-        }
-        else {
-            this.end.style.top  = (parseInt(this.b.style.top)  + parseInt(this.b.parentNode.style.top) + 23)+"px";
-            this.end.style.height = (parseInt(this.a.style.top)  + parseInt(this.a.parentNode.style.top) - ((parseInt(this.b.style.top)  + parseInt(this.b.parentNode.style.top))) ) - 11 +"px";
-
-            this.arr.style.top = this.end.style.top;
-            this.arr.src = "img/arrow_up.png";
-        }
-
-
-        this.o.style.visibility = "visible";
-        
-        console.log("met: " + method + " obj: " + (obj == this.a ? "Obj A" : (obj == this.b ? "Obj B" : "Other")) );
-    }
-}