* Build new version of ace
This commit is contained in:
parent
7f5db3f6b4
commit
491250b68a
7 changed files with 135 additions and 43 deletions
|
|
@ -11754,6 +11754,14 @@ var Editor = function(renderer, session) {
|
||||||
return this.$highlightSelectedWord;
|
return this.$highlightSelectedWord;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setAnimatedScroll = function(shouldAnimate){
|
||||||
|
this.renderer.setAnimatedScroll(shouldAnimate);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getAnimatedScroll = function(){
|
||||||
|
this.rendered.getAnimatedScroll();
|
||||||
|
}
|
||||||
|
|
||||||
this.setShowInvisibles = function(showInvisibles) {
|
this.setShowInvisibles = function(showInvisibles) {
|
||||||
if (this.getShowInvisibles() == showInvisibles)
|
if (this.getShowInvisibles() == showInvisibles)
|
||||||
return;
|
return;
|
||||||
|
|
@ -14623,6 +14631,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$horizScroll = true;
|
this.$horizScroll = true;
|
||||||
this.$horizScrollAlwaysVisible = true;
|
this.$horizScrollAlwaysVisible = true;
|
||||||
|
|
||||||
|
this.$animatedScroll = false;
|
||||||
|
|
||||||
this.scrollBar = new ScrollBar(container);
|
this.scrollBar = new ScrollBar(container);
|
||||||
this.scrollBar.addEventListener("scroll", function(e) {
|
this.scrollBar.addEventListener("scroll", function(e) {
|
||||||
_self.session.setScrollTop(e.data);
|
_self.session.setScrollTop(e.data);
|
||||||
|
|
@ -14794,6 +14804,14 @@ var VirtualRenderer = function(container, theme) {
|
||||||
return this.session.adjustWrapLimit(limit);
|
return this.session.adjustWrapLimit(limit);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setAnimatedScroll = function(shouldAnimate){
|
||||||
|
this.$animatedScroll = shouldAnimate;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getAnimatedscroll = function(){
|
||||||
|
return this.$animatedScroll
|
||||||
|
}
|
||||||
|
|
||||||
this.setShowInvisibles = function(showInvisibles) {
|
this.setShowInvisibles = function(showInvisibles) {
|
||||||
if (this.$textLayer.setShowInvisibles(showInvisibles))
|
if (this.$textLayer.setShowInvisibles(showInvisibles))
|
||||||
this.$loop.schedule(this.CHANGE_TEXT);
|
this.$loop.schedule(this.CHANGE_TEXT);
|
||||||
|
|
@ -15220,7 +15238,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
//@todo I would like to make this animation a setting. How?
|
//@todo I would like to make this animation a setting. How?
|
||||||
|
|
||||||
var STEPS = 15;
|
var STEPS = 10;
|
||||||
function calcSteps(fromValue, toValue){
|
function calcSteps(fromValue, toValue){
|
||||||
var i = 0,
|
var i = 0,
|
||||||
l = STEPS,
|
l = STEPS,
|
||||||
|
|
@ -15244,15 +15262,20 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (center)
|
if (center)
|
||||||
offset -= this.$size.scrollerHeight / 2;
|
offset -= this.$size.scrollerHeight / 2;
|
||||||
|
|
||||||
var i = 0, _self = this,
|
if (this.$animatedScroll) {
|
||||||
steps = calcSteps(this.scrollTop, offset);// console.dir(steps);
|
var i = 0, _self = this,
|
||||||
clearInterval(_self.$timer);
|
steps = calcSteps(this.scrollTop, offset);
|
||||||
this.$timer = setInterval(function(){
|
clearInterval(_self.$timer);
|
||||||
_self.session.setScrollTop(steps[i]);
|
this.$timer = setInterval(function(){
|
||||||
|
_self.session.setScrollTop(steps[i]);
|
||||||
|
|
||||||
if (++i == STEPS + 1)
|
if (++i == STEPS + 1)
|
||||||
clearInterval(_self.$timer);
|
clearInterval(_self.$timer);
|
||||||
}, 10);
|
}, 10);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.session.setScrollTop(offset);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.scrollToY = function(scrollTop) {
|
this.scrollToY = function(scrollTop) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
Ace
|
Ace
|
||||||
version 0.2.0
|
version 0.2.0
|
||||||
commit b47b0e9225814c5b86de1804ce0de3e46d8218ec
|
commit 7f5db3f6b43e3ad85d359c2f065044687f4baef6
|
||||||
|
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -2983,6 +2983,14 @@ var Editor = function(renderer, session) {
|
||||||
return this.$highlightSelectedWord;
|
return this.$highlightSelectedWord;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setAnimatedScroll = function(shouldAnimate){
|
||||||
|
this.renderer.setAnimatedScroll(shouldAnimate);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getAnimatedScroll = function(){
|
||||||
|
this.rendered.getAnimatedScroll();
|
||||||
|
}
|
||||||
|
|
||||||
this.setShowInvisibles = function(showInvisibles) {
|
this.setShowInvisibles = function(showInvisibles) {
|
||||||
if (this.getShowInvisibles() == showInvisibles)
|
if (this.getShowInvisibles() == showInvisibles)
|
||||||
return;
|
return;
|
||||||
|
|
@ -11919,6 +11927,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$horizScroll = true;
|
this.$horizScroll = true;
|
||||||
this.$horizScrollAlwaysVisible = true;
|
this.$horizScrollAlwaysVisible = true;
|
||||||
|
|
||||||
|
this.$animatedScroll = false;
|
||||||
|
|
||||||
this.scrollBar = new ScrollBar(container);
|
this.scrollBar = new ScrollBar(container);
|
||||||
this.scrollBar.addEventListener("scroll", function(e) {
|
this.scrollBar.addEventListener("scroll", function(e) {
|
||||||
_self.session.setScrollTop(e.data);
|
_self.session.setScrollTop(e.data);
|
||||||
|
|
@ -12090,6 +12100,14 @@ var VirtualRenderer = function(container, theme) {
|
||||||
return this.session.adjustWrapLimit(limit);
|
return this.session.adjustWrapLimit(limit);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setAnimatedScroll = function(shouldAnimate){
|
||||||
|
this.$animatedScroll = shouldAnimate;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getAnimatedscroll = function(){
|
||||||
|
return this.$animatedScroll
|
||||||
|
}
|
||||||
|
|
||||||
this.setShowInvisibles = function(showInvisibles) {
|
this.setShowInvisibles = function(showInvisibles) {
|
||||||
if (this.$textLayer.setShowInvisibles(showInvisibles))
|
if (this.$textLayer.setShowInvisibles(showInvisibles))
|
||||||
this.$loop.schedule(this.CHANGE_TEXT);
|
this.$loop.schedule(this.CHANGE_TEXT);
|
||||||
|
|
@ -12516,7 +12534,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
//@todo I would like to make this animation a setting. How?
|
//@todo I would like to make this animation a setting. How?
|
||||||
|
|
||||||
var STEPS = 15;
|
var STEPS = 10;
|
||||||
function calcSteps(fromValue, toValue){
|
function calcSteps(fromValue, toValue){
|
||||||
var i = 0,
|
var i = 0,
|
||||||
l = STEPS,
|
l = STEPS,
|
||||||
|
|
@ -12540,15 +12558,20 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (center)
|
if (center)
|
||||||
offset -= this.$size.scrollerHeight / 2;
|
offset -= this.$size.scrollerHeight / 2;
|
||||||
|
|
||||||
var i = 0, _self = this,
|
if (this.$animatedScroll) {
|
||||||
steps = calcSteps(this.scrollTop, offset);// console.dir(steps);
|
var i = 0, _self = this,
|
||||||
clearInterval(_self.$timer);
|
steps = calcSteps(this.scrollTop, offset);
|
||||||
this.$timer = setInterval(function(){
|
clearInterval(_self.$timer);
|
||||||
_self.session.setScrollTop(steps[i]);
|
this.$timer = setInterval(function(){
|
||||||
|
_self.session.setScrollTop(steps[i]);
|
||||||
|
|
||||||
if (++i == STEPS + 1)
|
if (++i == STEPS + 1)
|
||||||
clearInterval(_self.$timer);
|
clearInterval(_self.$timer);
|
||||||
}, 10);
|
}, 10);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.session.setScrollTop(offset);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.scrollToY = function(scrollTop) {
|
this.scrollToY = function(scrollTop) {
|
||||||
|
|
|
||||||
|
|
@ -2983,6 +2983,14 @@ var Editor = function(renderer, session) {
|
||||||
return this.$highlightSelectedWord;
|
return this.$highlightSelectedWord;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setAnimatedScroll = function(shouldAnimate){
|
||||||
|
this.renderer.setAnimatedScroll(shouldAnimate);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getAnimatedScroll = function(){
|
||||||
|
this.rendered.getAnimatedScroll();
|
||||||
|
}
|
||||||
|
|
||||||
this.setShowInvisibles = function(showInvisibles) {
|
this.setShowInvisibles = function(showInvisibles) {
|
||||||
if (this.getShowInvisibles() == showInvisibles)
|
if (this.getShowInvisibles() == showInvisibles)
|
||||||
return;
|
return;
|
||||||
|
|
@ -11919,6 +11927,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$horizScroll = true;
|
this.$horizScroll = true;
|
||||||
this.$horizScrollAlwaysVisible = true;
|
this.$horizScrollAlwaysVisible = true;
|
||||||
|
|
||||||
|
this.$animatedScroll = false;
|
||||||
|
|
||||||
this.scrollBar = new ScrollBar(container);
|
this.scrollBar = new ScrollBar(container);
|
||||||
this.scrollBar.addEventListener("scroll", function(e) {
|
this.scrollBar.addEventListener("scroll", function(e) {
|
||||||
_self.session.setScrollTop(e.data);
|
_self.session.setScrollTop(e.data);
|
||||||
|
|
@ -12090,6 +12100,14 @@ var VirtualRenderer = function(container, theme) {
|
||||||
return this.session.adjustWrapLimit(limit);
|
return this.session.adjustWrapLimit(limit);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setAnimatedScroll = function(shouldAnimate){
|
||||||
|
this.$animatedScroll = shouldAnimate;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getAnimatedscroll = function(){
|
||||||
|
return this.$animatedScroll
|
||||||
|
}
|
||||||
|
|
||||||
this.setShowInvisibles = function(showInvisibles) {
|
this.setShowInvisibles = function(showInvisibles) {
|
||||||
if (this.$textLayer.setShowInvisibles(showInvisibles))
|
if (this.$textLayer.setShowInvisibles(showInvisibles))
|
||||||
this.$loop.schedule(this.CHANGE_TEXT);
|
this.$loop.schedule(this.CHANGE_TEXT);
|
||||||
|
|
@ -12516,7 +12534,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
//@todo I would like to make this animation a setting. How?
|
//@todo I would like to make this animation a setting. How?
|
||||||
|
|
||||||
var STEPS = 15;
|
var STEPS = 10;
|
||||||
function calcSteps(fromValue, toValue){
|
function calcSteps(fromValue, toValue){
|
||||||
var i = 0,
|
var i = 0,
|
||||||
l = STEPS,
|
l = STEPS,
|
||||||
|
|
@ -12540,15 +12558,20 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (center)
|
if (center)
|
||||||
offset -= this.$size.scrollerHeight / 2;
|
offset -= this.$size.scrollerHeight / 2;
|
||||||
|
|
||||||
var i = 0, _self = this,
|
if (this.$animatedScroll) {
|
||||||
steps = calcSteps(this.scrollTop, offset);// console.dir(steps);
|
var i = 0, _self = this,
|
||||||
clearInterval(_self.$timer);
|
steps = calcSteps(this.scrollTop, offset);
|
||||||
this.$timer = setInterval(function(){
|
clearInterval(_self.$timer);
|
||||||
_self.session.setScrollTop(steps[i]);
|
this.$timer = setInterval(function(){
|
||||||
|
_self.session.setScrollTop(steps[i]);
|
||||||
|
|
||||||
if (++i == STEPS + 1)
|
if (++i == STEPS + 1)
|
||||||
clearInterval(_self.$timer);
|
clearInterval(_self.$timer);
|
||||||
}, 10);
|
}, 10);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.session.setScrollTop(offset);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.scrollToY = function(scrollTop) {
|
this.scrollToY = function(scrollTop) {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -3549,6 +3549,14 @@ var Editor = function(renderer, session) {
|
||||||
return this.$highlightSelectedWord;
|
return this.$highlightSelectedWord;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setAnimatedScroll = function(shouldAnimate){
|
||||||
|
this.renderer.setAnimatedScroll(shouldAnimate);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getAnimatedScroll = function(){
|
||||||
|
this.rendered.getAnimatedScroll();
|
||||||
|
}
|
||||||
|
|
||||||
this.setShowInvisibles = function(showInvisibles) {
|
this.setShowInvisibles = function(showInvisibles) {
|
||||||
if (this.getShowInvisibles() == showInvisibles)
|
if (this.getShowInvisibles() == showInvisibles)
|
||||||
return;
|
return;
|
||||||
|
|
@ -12424,6 +12432,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$horizScroll = true;
|
this.$horizScroll = true;
|
||||||
this.$horizScrollAlwaysVisible = true;
|
this.$horizScrollAlwaysVisible = true;
|
||||||
|
|
||||||
|
this.$animatedScroll = false;
|
||||||
|
|
||||||
this.scrollBar = new ScrollBar(container);
|
this.scrollBar = new ScrollBar(container);
|
||||||
this.scrollBar.addEventListener("scroll", function(e) {
|
this.scrollBar.addEventListener("scroll", function(e) {
|
||||||
_self.session.setScrollTop(e.data);
|
_self.session.setScrollTop(e.data);
|
||||||
|
|
@ -12595,6 +12605,14 @@ var VirtualRenderer = function(container, theme) {
|
||||||
return this.session.adjustWrapLimit(limit);
|
return this.session.adjustWrapLimit(limit);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setAnimatedScroll = function(shouldAnimate){
|
||||||
|
this.$animatedScroll = shouldAnimate;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getAnimatedscroll = function(){
|
||||||
|
return this.$animatedScroll
|
||||||
|
}
|
||||||
|
|
||||||
this.setShowInvisibles = function(showInvisibles) {
|
this.setShowInvisibles = function(showInvisibles) {
|
||||||
if (this.$textLayer.setShowInvisibles(showInvisibles))
|
if (this.$textLayer.setShowInvisibles(showInvisibles))
|
||||||
this.$loop.schedule(this.CHANGE_TEXT);
|
this.$loop.schedule(this.CHANGE_TEXT);
|
||||||
|
|
@ -13021,7 +13039,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
//@todo I would like to make this animation a setting. How?
|
//@todo I would like to make this animation a setting. How?
|
||||||
|
|
||||||
var STEPS = 15;
|
var STEPS = 10;
|
||||||
function calcSteps(fromValue, toValue){
|
function calcSteps(fromValue, toValue){
|
||||||
var i = 0,
|
var i = 0,
|
||||||
l = STEPS,
|
l = STEPS,
|
||||||
|
|
@ -13045,15 +13063,20 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (center)
|
if (center)
|
||||||
offset -= this.$size.scrollerHeight / 2;
|
offset -= this.$size.scrollerHeight / 2;
|
||||||
|
|
||||||
var i = 0, _self = this,
|
if (this.$animatedScroll) {
|
||||||
steps = calcSteps(this.scrollTop, offset);// console.dir(steps);
|
var i = 0, _self = this,
|
||||||
clearInterval(_self.$timer);
|
steps = calcSteps(this.scrollTop, offset);
|
||||||
this.$timer = setInterval(function(){
|
clearInterval(_self.$timer);
|
||||||
_self.session.setScrollTop(steps[i]);
|
this.$timer = setInterval(function(){
|
||||||
|
_self.session.setScrollTop(steps[i]);
|
||||||
|
|
||||||
if (++i == STEPS + 1)
|
if (++i == STEPS + 1)
|
||||||
clearInterval(_self.$timer);
|
clearInterval(_self.$timer);
|
||||||
}, 10);
|
}, 10);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.session.setScrollTop(offset);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.scrollToY = function(scrollTop) {
|
this.scrollToY = function(scrollTop) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue