X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/0da45be34c7019ee362d1892e92dd53e743933b6..a5999e7b582435f9a77b5847f1590ebb8d7ccb36:/project/static/js/editor.ui.js 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