From 4ed6afc829635615b7faf6be45b199145e37fad3 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 30 Jan 2014 21:09:25 +0400 Subject: [PATCH] convert autoScrollEditorIntoView into preoper option --- lib/ace/editor.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/ace/editor.js b/lib/ace/editor.js index 30fec403..894afee3 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -2310,7 +2310,7 @@ var Editor = function(renderer, session) { * @param {Boolean} enable default true **/ this.setAutoScrollEditorIntoView = function(enable) { - if (enable === false) + if (!enable) return; var rect; var self = this; @@ -2352,7 +2352,7 @@ var Editor = function(renderer, session) { } }); this.setAutoScrollEditorIntoView = function(enable) { - if (enable === true) + if (enable) return; delete this.setAutoScrollEditorIntoView; this.removeEventListener("changeSelection", onChangeSelection); @@ -2409,6 +2409,9 @@ config.defineOptions(Editor.prototype, "editor", { }, behavioursEnabled: {initialValue: true}, wrapBehavioursEnabled: {initialValue: true}, + autoScrollEditorIntoView: { + set: function(val) {this.setAutoScrollEditorIntoView(val)} + }, hScrollBarAlwaysVisible: "renderer", vScrollBarAlwaysVisible: "renderer",