Option to toggle editor margin resizers, disabled by default

This commit is contained in:
Mo Bitar
2018-08-16 09:48:48 -05:00
parent 71f4f9aba1
commit 9926f90697
2 changed files with 15 additions and 9 deletions

View File

@@ -479,6 +479,7 @@ angular.module('app')
this.loadPreferences = function() {
this.monospaceFont = authManager.getUserPrefValue("monospaceFont", "monospace");
this.spellcheck = authManager.getUserPrefValue("spellcheck", true);
this.marginResizersEnabled = authManager.getUserPrefValue("marginResizersEnabled", false);
if(!document.getElementById("editor-content")) {
// Elements have not yet loaded due to ng-if around wrapper
@@ -487,14 +488,16 @@ angular.module('app')
this.reloadFont();
let width = authManager.getUserPrefValue("editorWidth", null);
if(width !== null) {
this.resizeControl.setWidth(width);
}
if(this.marginResizersEnabled) {
let width = authManager.getUserPrefValue("editorWidth", null);
if(width !== null) {
this.resizeControl.setWidth(width);
}
let left = authManager.getUserPrefValue("editorLeft", null);
if(left !== null) {
this.resizeControl.setLeft(left);
let left = authManager.getUserPrefValue("editorLeft", null);
if(left !== null) {
this.resizeControl.setLeft(left);
}
}
}