From f12f67cc74ae9fd37b0cc6a142696c568daaa1bc Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Mar 2013 17:06:45 -0700 Subject: [PATCH 1/4] Moved referenced web directory. --- web | 1 - {webpy/web => web}/__init__.py | 0 {webpy/web => web}/application.py | 0 {webpy/web => web}/browser.py | 0 {webpy/web => web}/contrib/__init__.py | 0 {webpy/web => web}/contrib/template.py | 0 {webpy/web => web}/db.py | 0 {webpy/web => web}/debugerror.py | 0 {webpy/web => web}/form.py | 0 {webpy/web => web}/http.py | 0 {webpy/web => web}/httpserver.py | 0 {webpy/web => web}/net.py | 0 {webpy/web => web}/session.py | 0 {webpy/web => web}/template.py | 0 {webpy/web => web}/test.py | 0 {webpy/web => web}/utils.py | 0 {webpy/web => web}/webapi.py | 0 {webpy/web => web}/webopenid.py | 0 {webpy/web => web}/wsgi.py | 0 {webpy/web => web}/wsgiserver/LICENSE.txt | 0 {webpy/web => web}/wsgiserver/__init__.py | 0 webpy/.gitignore | 2 -- 22 files changed, 3 deletions(-) delete mode 120000 web rename {webpy/web => web}/__init__.py (100%) rename {webpy/web => web}/application.py (100%) mode change 100755 => 100644 rename {webpy/web => web}/browser.py (100%) rename {webpy/web => web}/contrib/__init__.py (100%) rename {webpy/web => web}/contrib/template.py (100%) rename {webpy/web => web}/db.py (100%) rename {webpy/web => web}/debugerror.py (100%) rename {webpy/web => web}/form.py (100%) rename {webpy/web => web}/http.py (100%) rename {webpy/web => web}/httpserver.py (100%) rename {webpy/web => web}/net.py (100%) rename {webpy/web => web}/session.py (100%) rename {webpy/web => web}/template.py (100%) rename {webpy/web => web}/test.py (100%) rename {webpy/web => web}/utils.py (100%) mode change 100755 => 100644 rename {webpy/web => web}/webapi.py (100%) rename {webpy/web => web}/webopenid.py (100%) rename {webpy/web => web}/wsgi.py (100%) rename {webpy/web => web}/wsgiserver/LICENSE.txt (100%) rename {webpy/web => web}/wsgiserver/__init__.py (100%) delete mode 100644 webpy/.gitignore diff --git a/web b/web deleted file mode 120000 index fce84a5..0000000 --- a/web +++ /dev/null @@ -1 +0,0 @@ -webpy/web \ No newline at end of file diff --git a/webpy/web/__init__.py b/web/__init__.py similarity index 100% rename from webpy/web/__init__.py rename to web/__init__.py diff --git a/webpy/web/application.py b/web/application.py old mode 100755 new mode 100644 similarity index 100% rename from webpy/web/application.py rename to web/application.py diff --git a/webpy/web/browser.py b/web/browser.py similarity index 100% rename from webpy/web/browser.py rename to web/browser.py diff --git a/webpy/web/contrib/__init__.py b/web/contrib/__init__.py similarity index 100% rename from webpy/web/contrib/__init__.py rename to web/contrib/__init__.py diff --git a/webpy/web/contrib/template.py b/web/contrib/template.py similarity index 100% rename from webpy/web/contrib/template.py rename to web/contrib/template.py diff --git a/webpy/web/db.py b/web/db.py similarity index 100% rename from webpy/web/db.py rename to web/db.py diff --git a/webpy/web/debugerror.py b/web/debugerror.py similarity index 100% rename from webpy/web/debugerror.py rename to web/debugerror.py diff --git a/webpy/web/form.py b/web/form.py similarity index 100% rename from webpy/web/form.py rename to web/form.py diff --git a/webpy/web/http.py b/web/http.py similarity index 100% rename from webpy/web/http.py rename to web/http.py diff --git a/webpy/web/httpserver.py b/web/httpserver.py similarity index 100% rename from webpy/web/httpserver.py rename to web/httpserver.py diff --git a/webpy/web/net.py b/web/net.py similarity index 100% rename from webpy/web/net.py rename to web/net.py diff --git a/webpy/web/session.py b/web/session.py similarity index 100% rename from webpy/web/session.py rename to web/session.py diff --git a/webpy/web/template.py b/web/template.py similarity index 100% rename from webpy/web/template.py rename to web/template.py diff --git a/webpy/web/test.py b/web/test.py similarity index 100% rename from webpy/web/test.py rename to web/test.py diff --git a/webpy/web/utils.py b/web/utils.py old mode 100755 new mode 100644 similarity index 100% rename from webpy/web/utils.py rename to web/utils.py diff --git a/webpy/web/webapi.py b/web/webapi.py similarity index 100% rename from webpy/web/webapi.py rename to web/webapi.py diff --git a/webpy/web/webopenid.py b/web/webopenid.py similarity index 100% rename from webpy/web/webopenid.py rename to web/webopenid.py diff --git a/webpy/web/wsgi.py b/web/wsgi.py similarity index 100% rename from webpy/web/wsgi.py rename to web/wsgi.py diff --git a/webpy/web/wsgiserver/LICENSE.txt b/web/wsgiserver/LICENSE.txt similarity index 100% rename from webpy/web/wsgiserver/LICENSE.txt rename to web/wsgiserver/LICENSE.txt diff --git a/webpy/web/wsgiserver/__init__.py b/web/wsgiserver/__init__.py similarity index 100% rename from webpy/web/wsgiserver/__init__.py rename to web/wsgiserver/__init__.py diff --git a/webpy/.gitignore b/webpy/.gitignore deleted file mode 100644 index d0a113f..0000000 --- a/webpy/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.pyc -.DS_Store \ No newline at end of file From 35e3219972a3945b4fe2557fd4a686dc936cabf7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Mar 2013 17:11:24 -0700 Subject: [PATCH 2/4] Removed $.merge call on data hash in addNode. $.merge removes all event listeners which prevents Ember.js observables from firing. --- Source/Graph/Graph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Graph/Graph.js b/Source/Graph/Graph.js index 76fd2a5..7750963 100644 --- a/Source/Graph/Graph.js +++ b/Source/Graph/Graph.js @@ -167,7 +167,7 @@ $jit.Graph = new Class({ this.nodes[obj.id] = new Graph.Node($.extend({ 'id': obj.id, 'name': obj.name, - 'data': $.merge(obj.data || {}, {}), + 'data': obj.data || {}, 'adjacencies': edges }, this.opt.Node), this.opt.klass, From f95e85f9fe563e3877f800b215da213e664898fa Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Tue, 19 Mar 2013 19:21:26 -0700 Subject: [PATCH 3/4] Check if mouse movement occured before setting moved boolean. This boolean is used to indicate the user is click + dragging in the interface and if set will prevent onClick handlers for nodes from firing. onClick events are prevented from firing on line 265 of Extras.js. --- Source/Extras/Extras.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Source/Extras/Extras.js b/Source/Extras/Extras.js index 945247b..489f2d1 100644 --- a/Source/Extras/Extras.js +++ b/Source/Extras/Extras.js @@ -255,7 +255,7 @@ Extras.Classes.Events = new Class({ this.touchMoved = false; this.moved = false; - + this.lastPosition = false; }, setAsProperty: $.lambda(true), @@ -277,6 +277,7 @@ Extras.Classes.Events = new Class({ } this.pressed = this.moved = false; } + this.lastPosition = false; }, onMouseOut: function(e, win, event) { @@ -313,9 +314,16 @@ Extras.Classes.Events = new Class({ }, onMouseMove: function(e, win, event) { - var label, evt = $.event.get(e, win); + var label, evt = $.event.get(e, win), + // Check if mouse actually moved + didMove = this.lastPosition && this.mouseDidMove(e); + // Update last position to be current position for next time + this.lastPosition = { + x: e.clientX, + y: e.clientY + }; if(this.pressed) { - this.moved = true; + this.moved = didMove; this.config.onDragMove(this.pressed, event, evt); return; } @@ -388,6 +396,12 @@ Extras.Classes.Events = new Class({ } this.touched = this.touchMoved = false; } + }, + mouseDidMove: function(event) { + var deltaX = event.clientX - this.lastPosition.x, + deltaY = event.clientY - this.lastPosition.y, + movement = deltaX * deltaX + deltaY * deltaY; + return movement > 0; } }); From 313609bb6f4c36c4596cc5795a3bcdb5a1b8a1f4 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Thu, 21 Mar 2013 09:46:09 -0700 Subject: [PATCH 4/4] Scale node width/height for ST.Label.DOM placeLabel. --- Source/Visualizations/Spacetree.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Visualizations/Spacetree.js b/Source/Visualizations/Spacetree.js index a6e2fd8..31e52e7 100644 --- a/Source/Visualizations/Spacetree.js +++ b/Source/Visualizations/Spacetree.js @@ -1268,6 +1268,10 @@ $jit.ST.Label.DOM = new Class({ sy = canvas.scaleOffsetY, posx = pos.x * sx + ox, posy = pos.y * sy + oy; + + // Scale node width/height + w = w * sx; + h = h * sy; if(dim.align == "center") { labelPos= {