From 372481180237a157bbdee69d65a7830ac31b7209 Mon Sep 17 00:00:00 2001 From: lealife Date: Sat, 28 Nov 2015 15:33:30 +0800 Subject: [PATCH] set md column width --- public/js/app/page.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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();