set md column width

This commit is contained in:
lealife
2015-11-28 15:33:30 +08:00
parent 10ff48267f
commit 3724811802

View File

@ -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();