8
Когда я использую ace (с jquery-ace), чтобы изменить текстовое поле в асе-редактор, он показывает это предупреждение на консоли:Где установить редактор Ace blockScrolling?
Automatically scrolling cursor into view after selection change
this will be disabled in the next version
set editor.$blockScrolling = Infinity to disable this message
Где установить эту editor.$blockScrolling
переменным, чтобы удалить эти предупреждения?
var aces = el.find('textarea.code.json');
var aceInit = function() {
//window.ace.$blockScrolling = Infinity; // no effect
//$.ace.$blockScrolling = Infinity; // no effect
//window.jQueryAce.AceDecorator.$blockScrolling = Infinity; // no effect
//window.jQueryAce.BaseEditor.$blockScrolling = Infinity; // no effect
//window.jQueryAce.TextAreaEditor.$blockScrolling = Infinity; // no effect
aces.ace({theme: 'eclipse', lang: 'json'}).each(function (idx, editor) {
var el = $(editor);
var editor = el.data('ace').editor;
//editor.$blockScrolling = Infinity; // no effect
var ace = editor.ace;
//ace.$blockScrolling = Infinity; // no effect, even this the correct one
ace.setReadOnly(el.prop('disabled'));
ace.setOption("maxLines", 10);
ace.setOption("minLines", 2);
});
}; // this function called when ace.js, mode-json.js and jquery-ace.js loaded
один с '// никакого эффекта, даже это правильный one' является правильным. Может быть, что-то еще не отображает это свойство позже? Не могли бы вы создать демонстрацию, показывающую эту проблему? –
ah wait, теперь это работает, может быть, я забыл перезагрузить javascript. – Kokizzu