diff --git a/public/js/app/page.js b/public/js/app/page.js index 3110554..05ac2c1 100644 --- a/public/js/app/page.js +++ b/public/js/app/page.js @@ -314,14 +314,14 @@ var Resize = { // 设置宽度 setMdColumnWidth: function(mdEditorWidth) { var self = this; - if(mdEditorWidth > 100) { + var allWidth = $('#note').width(); + if(mdEditorWidth > 100 && mdEditorWidth < allWidth - 80) { UserInfo.MdEditorWidth = mdEditorWidth; - log(mdEditorWidth) self.leftColumn.width(mdEditorWidth); self.rightColumn.css("left", mdEditorWidth); // self.mdSplitter.css("left", mdEditorWidth); } - + // 这样, scrollPreview 才会到正确的位置 if(MD) { MD.onResize();