X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/1a2a6714d405526c16ac4f0900b6dfb0c4c83b6a..5620e337719f6e64efaf77ec702c7d6848cc7255:/project/static/js/editor.ui.js?ds=inline diff --git a/project/static/js/editor.ui.js b/project/static/js/editor.ui.js index 41025fa0..aed04553 100755 --- a/project/static/js/editor.ui.js +++ b/project/static/js/editor.ui.js @@ -15,6 +15,11 @@ Editor.prototype.setupUI = function() { var resize_changed = function(event) { var old_width = parseInt(event.data.overlay.css('width')); var delta = event.pageX + event.data.hotspot_x - old_width; + + if(old_width + delta < 12) delta = 12 - old_width; + if(old_width + delta > $(window).width()) + delta = $(window).width() - old_width; + event.data.overlay.css({ 'width': old_width + delta }); @@ -135,9 +140,7 @@ Editor.prototype.setupUI = function() { $(document).bind('panel:contentChanged', function() { self.onContentChanged.apply(self, arguments) - }); - - + }); /* * Connect various buttons