diff options
author | Ondrej Zara <ondrej.zara@firma.seznam.cz> | 2015-06-12 09:30:51 +0200 |
---|---|---|
committer | Ondrej Zara <ondrej.zara@firma.seznam.cz> | 2015-06-12 09:30:51 +0200 |
commit | b3bf2bd8ecc9bd175793f67c46a8319b7d67174c (patch) | |
tree | e74aa005861dbd62381cfce3aac1d1acba3728c0 /js/visual.js | |
parent | c5a07ea2b037cc880225defc58ead88c916fa066 (diff) | |
download | wwwsqldesigner-b3bf2bd8ecc9bd175793f67c46a8319b7d67174c.zip wwwsqldesigner-b3bf2bd8ecc9bd175793f67c46a8319b7d67174c.tar.gz wwwsqldesigner-b3bf2bd8ecc9bd175793f67c46a8319b7d67174c.tar.bz2 |
js modularized
Diffstat (limited to 'js/visual.js')
-rw-r--r-- | js/visual.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/js/visual.js b/js/visual.js new file mode 100644 index 0000000..4fb7045 --- /dev/null +++ b/js/visual.js @@ -0,0 +1,42 @@ +/* -------------------- base visual element -------------------- */ + +SQL.Visual = OZ.Class(); /* abstract parent */ +SQL.Visual.prototype.init = function() { + this._init(); + this._build(); +} + +SQL.Visual.prototype._init = function() { + this.dom = { + container: null, + title: null + }; + this.data = { + title:"" + } +} + +SQL.Visual.prototype._build = function() {} + +SQL.Visual.prototype.toXML = function() {} + +SQL.Visual.prototype.fromXML = function(node) {} + +SQL.Visual.prototype.destroy = function() { /* "destructor" */ + var p = this.dom.container.parentNode; + if (p && p.nodeType == 1) { + p.removeChild(this.dom.container); + } +} + +SQL.Visual.prototype.setTitle = function(text) { + if (!text) { return; } + this.data.title = text; + this.dom.title.innerHTML = text; +} + +SQL.Visual.prototype.getTitle = function() { + return this.data.title; +} + +SQL.Visual.prototype.redraw = function() {} |