fix setAutoScrollEditorIntoView and use in demo page
This commit is contained in:
parent
dce629169d
commit
7f76f0b81c
3 changed files with 13 additions and 5 deletions
|
|
@ -7,9 +7,12 @@ $(function() {
|
|||
editor.container.style.opacity = "";
|
||||
embedded_editor = ace.edit("embedded_ace_code");
|
||||
embedded_editor.container.style.opacity = "";
|
||||
editor.getSession().setMode("ace/mode/javascript");
|
||||
editor.getSession().setMode("ace/mode/javascript");
|
||||
embedded_editor.getSession().setMode("ace/mode/html");
|
||||
editor.session.setMode("ace/mode/javascript");
|
||||
editor.session.setMode("ace/mode/javascript");
|
||||
embedded_editor.session.setMode("ace/mode/html");
|
||||
|
||||
embedded_editor.setAutoScrollEditorIntoView(true);
|
||||
editor.setAutoScrollEditorIntoView(true);
|
||||
|
||||
$("ul.menu-list li").click(function(e) {
|
||||
if (e.target.tagName === "LI") {
|
||||
|
|
|
|||
|
|
@ -944,6 +944,11 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
style="position: relative; left: 3px; width: 96px;top: -12px;">
|
||||
<a href="http://slimtext.org/">Slim Text</a>
|
||||
</li>
|
||||
<li>
|
||||
<img src="https://www.decor-tab-creator.com/_files/decor_logo_white_new.png"
|
||||
style="position: relative; left: -5px; width: 111px;top: 15px;">
|
||||
<a href="https://www.decor-tab-creator.com">Decor</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/Gozala/sky-edit">Sky Edit</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -2136,7 +2136,7 @@ var Editor = function(renderer, session) {
|
|||
* @param {Boolean} enable default true
|
||||
**/
|
||||
this.setAutoScrollEditorIntoView = function(enable) {
|
||||
if (enable === true)
|
||||
if (enable === false)
|
||||
return;
|
||||
var rect;
|
||||
var self = this;
|
||||
|
|
@ -2178,7 +2178,7 @@ var Editor = function(renderer, session) {
|
|||
}
|
||||
});
|
||||
this.setAutoScrollEditorIntoView = function(enable) {
|
||||
if (enable === false)
|
||||
if (enable === true)
|
||||
return;
|
||||
delete this.setAutoScrollEditorIntoView;
|
||||
this.removeEventListener("changeSelection", onChangeSelection);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue