writting mode resize editor
This commit is contained in:
BIN
public/images/sprites.png
Normal file
BIN
public/images/sprites.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
2
public/js/app/page-min.js
vendored
2
public/js/app/page-min.js
vendored
File diff suppressed because one or more lines are too long
@ -716,9 +716,13 @@ editorMode.prototype.init = function() {
|
||||
this.changeMode(this.isWritingMode);
|
||||
var self = this;
|
||||
$("#toggleEditorMode").click(function() {
|
||||
//
|
||||
saveBookmark();
|
||||
var $a = $(this).find("a");
|
||||
var isWriting = self.isWriting($a.attr("href"));
|
||||
self.changeMode(isWriting);
|
||||
//
|
||||
restoreBookmark();
|
||||
});
|
||||
}
|
||||
// 改变模式
|
||||
@ -732,6 +736,16 @@ editorMode.prototype.changeMode = function(isWritingMode) {
|
||||
|
||||
$("#moreBtn i").removeClass("fa-angle-up").addClass("fa-angle-down");
|
||||
}
|
||||
|
||||
editorMode.prototype.resizeEditor = function() {
|
||||
// css还没渲染完
|
||||
setTimeout(function() {
|
||||
resizeEditor();
|
||||
}, 10);
|
||||
setTimeout(function() {
|
||||
resizeEditor();
|
||||
}, 20);
|
||||
}
|
||||
editorMode.prototype.normalMode = function() {
|
||||
/*
|
||||
var w = $(document).width();
|
||||
@ -755,7 +769,7 @@ editorMode.prototype.normalMode = function() {
|
||||
|
||||
// $("#lock").animate({right:w},1000);
|
||||
|
||||
resizeEditor();
|
||||
this.resizeEditor();
|
||||
}
|
||||
editorMode.prototype.writtingMode = function() {
|
||||
/*
|
||||
@ -785,8 +799,8 @@ editorMode.prototype.writtingMode = function() {
|
||||
|
||||
// $("#lock").animate({right:w},1000);
|
||||
// $("body").fadeIn();
|
||||
|
||||
resizeEditor();
|
||||
|
||||
this.resizeEditor();
|
||||
}
|
||||
|
||||
editorMode.prototype.getWritingCss = function() {
|
||||
|
Reference in New Issue
Block a user