diff options
| author | chm@openerp.com <> | 2014-03-26 15:16:29 +0100 |
|---|---|---|
| committer | chm@openerp.com <> | 2014-03-26 15:16:29 +0100 |
| commit | aa63c564629e6f3ecb72f1d8039e353158a1754d (patch) | |
| tree | cdba68855851d2519e14dff8c14abe1e2c5965c3 /addons/website/static/src/js/jQuery.transfo.js | |
| parent | b39be63a8b8e20ae30ed62ecce4f4f677e7e8e01 (diff) | |
[IMP] website editor: add style button on image
bzr revid: chm@openerp.com-20140326141629-diz4rk0789no7yyl
Diffstat (limited to 'addons/website/static/src/js/jQuery.transfo.js')
| -rw-r--r-- | addons/website/static/src/js/jQuery.transfo.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/addons/website/static/src/js/jQuery.transfo.js b/addons/website/static/src/js/jQuery.transfo.js index d8e15ce4010..df30fdccbb9 100644 --- a/addons/website/static/src/js/jQuery.transfo.js +++ b/addons/website/static/src/js/jQuery.transfo.js @@ -56,7 +56,16 @@ OTHER DEALINGS IN THE SOFTWARE. return $this.data('transfo') && $this.data('transfo').settings; }); } - return $this.data('transfo') && $this.data('transfo').settings; + return this.data('transfo') && $this.data('transfo').settings; + }, + center : function() { + if(this.length > 1) { + this.map(function () { + var $this = $(this); + return $this.data('transfo') && $this.data('transfo').$center.offset(); + }); + } + return this.data('transfo') && this.data('transfo').$center.offset(); } }; @@ -131,8 +140,7 @@ OTHER DEALINGS IN THE SOFTWARE. transfo.settings.pos = $this.offset(); transfo.settings.rotationStep = 5; - - console.log(transfo.settings); + transfo.settings.callback = function () {}; } function _bind ($this, transfo) { @@ -322,6 +330,8 @@ OTHER DEALINGS IN THE SOFTWARE. "z-index: 1000;" + "cursor: move;", settings); + + transfo.settings.callback.call($this[0], $this); } function _destroy ($this) { |
