package
This commit is contained in:
parent
b5898374b2
commit
3413b7df89
7 changed files with 49 additions and 3 deletions
|
|
@ -508,6 +508,7 @@ split.on("focus", function(editor) {
|
|||
env.split = split;
|
||||
window.env = env;
|
||||
window.editor = window.ace = env.editor;
|
||||
env.editor.setAnimatedScroll(true);
|
||||
|
||||
var docEl = document.getElementById("doc");
|
||||
var modeEl = document.getElementById("mode");
|
||||
|
|
@ -521,6 +522,7 @@ var showGutterEl = document.getElementById("show_gutter");
|
|||
var showPrintMarginEl = document.getElementById("show_print_margin");
|
||||
var highlightSelectedWordE = document.getElementById("highlight_selected_word");
|
||||
var showHScrollEl = document.getElementById("show_hscroll");
|
||||
var animateScrollEl = document.getElementById("animate_scroll");
|
||||
var softTabEl = document.getElementById("soft_tab");
|
||||
var behavioursEl = document.getElementById("enable_behaviours");
|
||||
|
||||
|
|
@ -577,6 +579,7 @@ function updateUIEditorOptions() {
|
|||
saveOption(showPrintMarginEl, editor.renderer.getShowPrintMargin());
|
||||
saveOption(highlightSelectedWordE, editor.getHighlightSelectedWord());
|
||||
saveOption(showHScrollEl, editor.renderer.getHScrollBarAlwaysVisible());
|
||||
saveOption(animateScrollEl, editor.getAnimatedScroll());
|
||||
saveOption(softTabEl, session.getUseSoftTabs());
|
||||
saveOption(behavioursEl, editor.getBehavioursEnabled());
|
||||
}
|
||||
|
|
@ -690,6 +693,10 @@ bindCheckbox("show_hscroll", function(checked) {
|
|||
env.editor.renderer.setHScrollBarAlwaysVisible(checked);
|
||||
});
|
||||
|
||||
bindCheckbox("animate_scroll", function(checked) {
|
||||
env.editor.setAnimatedScroll(checked);
|
||||
});
|
||||
|
||||
bindCheckbox("soft_tab", function(checked) {
|
||||
env.editor.getSession().setUseSoftTabs(checked);
|
||||
});
|
||||
|
|
@ -14218,6 +14225,14 @@ var Editor = function(renderer, session) {
|
|||
return this.$highlightSelectedWord;
|
||||
};
|
||||
|
||||
this.setAnimatedScroll = function(shouldAnimate){
|
||||
this.renderer.setAnimatedScroll(shouldAnimate);
|
||||
};
|
||||
|
||||
this.getAnimatedScroll = function(){
|
||||
return this.renderer.getAnimatedScroll();
|
||||
};
|
||||
|
||||
/**
|
||||
* Editor.setShowInvisibles(showInvisibles)
|
||||
* - showInvisibles (Boolean): Specifies whether or not to show invisible characters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue