From 29839b3e81ac6d4dfd6eb40a104e9a6d50e31b0d Mon Sep 17 00:00:00 2001 From: "ondrej.zara" Date: Sun, 3 Jan 2010 19:27:44 +0000 Subject: [PATCH] #47 rubberband --HG-- extra : convert_revision : svn%3Ab267cdba-c1da-11dd-874b-8bacd04a0a74/trunk%4075 --- index.html | 2 ++ js/wwwsqldesigner.js | 78 +++++++++++++++++++++++++++++++++++++++++++- styles/ie6.css | 4 +++ styles/ie7.css | 4 +++ styles/style.css | 11 ++++++- 5 files changed, 97 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 647fc23..4a37b98 100644 --- a/index.html +++ b/index.html @@ -52,6 +52,8 @@ +
+
diff --git a/js/wwwsqldesigner.js b/js/wwwsqldesigner.js index 73353aa..9f4d0bb 100644 --- a/js/wwwsqldesigner.js +++ b/js/wwwsqldesigner.js @@ -765,6 +765,9 @@ SQL.Table.prototype.redraw = function() { this.dom.mini.style.height = Math.round(h)+"px"; this.dom.mini.style.left = Math.round(x)+"px"; this.dom.mini.style.top = Math.round(y)+"px"; + + this.width = this.dom.container.offsetWidth; + this.height = this.dom.container.offsetHeight; var rs = this.getRelations(); for (var i=0;i=x && tx=x && tx1x1)) && + ((ty>=y && ty=y && ty1y1))) + { this.selection.push(t); } + } + this.processSelection(); +} + SQL.TableManager.prototype.click = function(e) { /* finish adding new table */ var newtable = false; if (this.adding) { @@ -2147,6 +2222,7 @@ SQL.Designer.prototype.dbResponse = function(xmlDoc) { SQL.Designer.prototype.init2 = function() { /* secondary init, after locale & datatypes were retrieved */ this.map = new SQL.Map(this); + this.rubberband = new SQL.Rubberband(this); this.tableManager = new SQL.TableManager(this); this.rowManager = new SQL.RowManager(this); this.keyManager = new SQL.KeyManager(this); diff --git a/styles/ie6.css b/styles/ie6.css index 03de786..2e56ff6 100644 --- a/styles/ie6.css +++ b/styles/ie6.css @@ -56,3 +56,7 @@ v\:* { #keys, #opts { width: expression(eval(document.documentElement.clientWidth)/2); } + +#rubberband { + filter: alpha(opacity=50); +} \ No newline at end of file diff --git a/styles/ie7.css b/styles/ie7.css index b333f0f..876bba7 100644 --- a/styles/ie7.css +++ b/styles/ie7.css @@ -13,3 +13,7 @@ v\:* { #keys, #opts { width: expression(eval(document.documentElement.clientWidth)/2); } + +#rubberband { + filter: alpha(opacity=50); +} diff --git a/styles/style.css b/styles/style.css index 032c51a..aec8414 100644 --- a/styles/style.css +++ b/styles/style.css @@ -226,4 +226,13 @@ label, input, select { position: absolute; top: 2px; right: 3px; -} \ No newline at end of file +} + +#rubberband { + position: absolute; + border: 1px solid #000; + background: #888; + opacity: 0.5; + z-index: 99; + visibility: hidden; +}