Update build files
This commit is contained in:
parent
5ebed0aadb
commit
fbff742540
7 changed files with 163 additions and 11 deletions
|
|
@ -12365,7 +12365,17 @@ var Editor = function(renderer, session) {
|
|||
var range = this.$search.find(this.session);
|
||||
if (range) {
|
||||
this.session.unfold(range);
|
||||
this.selection.setSelectionRange(range); // this scrolls selection into view
|
||||
this.$blockScrolling += 1;
|
||||
this.selection.setSelectionRange(range);
|
||||
this.$blockScrolling -= 1;
|
||||
|
||||
var cursor = this.getCursorPosition();
|
||||
if (!this.isRowFullyVisible(cursor.row))
|
||||
this.scrollToLine(cursor.row, true);
|
||||
|
||||
//@todo scroll X
|
||||
//if (!this.isRowFullyVisible(cursor.row))
|
||||
//this.scrollToLine(cursor.row, true);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -15208,13 +15218,41 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.session.setScrollTop(row * this.lineHeight);
|
||||
};
|
||||
|
||||
//@todo I would like to make this animation a setting. How?
|
||||
|
||||
var STEPS = 10;
|
||||
function calcSteps(fromValue, toValue){
|
||||
var i = 0,
|
||||
l = STEPS - 1,
|
||||
steps = [fromValue],
|
||||
func = function(t, x_min, dx) {
|
||||
if ((t /= .5) < 1)
|
||||
return dx / 2 * Math.pow(t, 3) + x_min;
|
||||
return dx / 2 * (Math.pow(t - 2, 3) + 2) + x_min;
|
||||
};
|
||||
|
||||
for (i = 0; i < l; ++i)
|
||||
steps.push(func(i / STEPS, fromValue, toValue - fromValue));
|
||||
steps.push(toValue);
|
||||
|
||||
return steps;
|
||||
}
|
||||
|
||||
this.scrollToLine = function(line, center) {
|
||||
var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
|
||||
var offset = pos.top;
|
||||
if (center)
|
||||
offset -= this.$size.scrollerHeight / 2;
|
||||
|
||||
this.session.setScrollTop(offset);
|
||||
var i = 0, _self = this,
|
||||
steps = calcSteps(this.scrollTop, offset);
|
||||
clearInterval(_self.$timer);
|
||||
this.$timer = setInterval(function(){
|
||||
_self.session.setScrollTop(steps[i]);
|
||||
|
||||
if (++i == STEPS)
|
||||
clearInterval(_self.$timer);
|
||||
}, 10);
|
||||
};
|
||||
|
||||
this.scrollToY = function(scrollTop) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
Ace
|
||||
version 0.2.0
|
||||
commit 9b4f97565d0c02c561a2e275d567d8611b91465f
|
||||
commit 5ebed0aadbe9294478807a22324938099fb1ef4a
|
||||
|
||||
|
||||
-->
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -3594,7 +3594,17 @@ var Editor = function(renderer, session) {
|
|||
var range = this.$search.find(this.session);
|
||||
if (range) {
|
||||
this.session.unfold(range);
|
||||
this.selection.setSelectionRange(range); // this scrolls selection into view
|
||||
this.$blockScrolling += 1;
|
||||
this.selection.setSelectionRange(range);
|
||||
this.$blockScrolling -= 1;
|
||||
|
||||
var cursor = this.getCursorPosition();
|
||||
if (!this.isRowFullyVisible(cursor.row))
|
||||
this.scrollToLine(cursor.row, true);
|
||||
|
||||
//@todo scroll X
|
||||
//if (!this.isRowFullyVisible(cursor.row))
|
||||
//this.scrollToLine(cursor.row, true);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -12504,13 +12514,41 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.session.setScrollTop(row * this.lineHeight);
|
||||
};
|
||||
|
||||
//@todo I would like to make this animation a setting. How?
|
||||
|
||||
var STEPS = 10;
|
||||
function calcSteps(fromValue, toValue){
|
||||
var i = 0,
|
||||
l = STEPS - 1,
|
||||
steps = [fromValue],
|
||||
func = function(t, x_min, dx) {
|
||||
if ((t /= .5) < 1)
|
||||
return dx / 2 * Math.pow(t, 3) + x_min;
|
||||
return dx / 2 * (Math.pow(t - 2, 3) + 2) + x_min;
|
||||
};
|
||||
|
||||
for (i = 0; i < l; ++i)
|
||||
steps.push(func(i / STEPS, fromValue, toValue - fromValue));
|
||||
steps.push(toValue);
|
||||
|
||||
return steps;
|
||||
}
|
||||
|
||||
this.scrollToLine = function(line, center) {
|
||||
var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
|
||||
var offset = pos.top;
|
||||
if (center)
|
||||
offset -= this.$size.scrollerHeight / 2;
|
||||
|
||||
this.session.setScrollTop(offset);
|
||||
var i = 0, _self = this,
|
||||
steps = calcSteps(this.scrollTop, offset);
|
||||
clearInterval(_self.$timer);
|
||||
this.$timer = setInterval(function(){
|
||||
_self.session.setScrollTop(steps[i]);
|
||||
|
||||
if (++i == STEPS)
|
||||
clearInterval(_self.$timer);
|
||||
}, 10);
|
||||
};
|
||||
|
||||
this.scrollToY = function(scrollTop) {
|
||||
|
|
|
|||
|
|
@ -3594,7 +3594,17 @@ var Editor = function(renderer, session) {
|
|||
var range = this.$search.find(this.session);
|
||||
if (range) {
|
||||
this.session.unfold(range);
|
||||
this.selection.setSelectionRange(range); // this scrolls selection into view
|
||||
this.$blockScrolling += 1;
|
||||
this.selection.setSelectionRange(range);
|
||||
this.$blockScrolling -= 1;
|
||||
|
||||
var cursor = this.getCursorPosition();
|
||||
if (!this.isRowFullyVisible(cursor.row))
|
||||
this.scrollToLine(cursor.row, true);
|
||||
|
||||
//@todo scroll X
|
||||
//if (!this.isRowFullyVisible(cursor.row))
|
||||
//this.scrollToLine(cursor.row, true);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -12504,13 +12514,41 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.session.setScrollTop(row * this.lineHeight);
|
||||
};
|
||||
|
||||
//@todo I would like to make this animation a setting. How?
|
||||
|
||||
var STEPS = 10;
|
||||
function calcSteps(fromValue, toValue){
|
||||
var i = 0,
|
||||
l = STEPS - 1,
|
||||
steps = [fromValue],
|
||||
func = function(t, x_min, dx) {
|
||||
if ((t /= .5) < 1)
|
||||
return dx / 2 * Math.pow(t, 3) + x_min;
|
||||
return dx / 2 * (Math.pow(t - 2, 3) + 2) + x_min;
|
||||
};
|
||||
|
||||
for (i = 0; i < l; ++i)
|
||||
steps.push(func(i / STEPS, fromValue, toValue - fromValue));
|
||||
steps.push(toValue);
|
||||
|
||||
return steps;
|
||||
}
|
||||
|
||||
this.scrollToLine = function(line, center) {
|
||||
var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
|
||||
var offset = pos.top;
|
||||
if (center)
|
||||
offset -= this.$size.scrollerHeight / 2;
|
||||
|
||||
this.session.setScrollTop(offset);
|
||||
var i = 0, _self = this,
|
||||
steps = calcSteps(this.scrollTop, offset);
|
||||
clearInterval(_self.$timer);
|
||||
this.$timer = setInterval(function(){
|
||||
_self.session.setScrollTop(steps[i]);
|
||||
|
||||
if (++i == STEPS)
|
||||
clearInterval(_self.$timer);
|
||||
}, 10);
|
||||
};
|
||||
|
||||
this.scrollToY = function(scrollTop) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -4160,7 +4160,17 @@ var Editor = function(renderer, session) {
|
|||
var range = this.$search.find(this.session);
|
||||
if (range) {
|
||||
this.session.unfold(range);
|
||||
this.selection.setSelectionRange(range); // this scrolls selection into view
|
||||
this.$blockScrolling += 1;
|
||||
this.selection.setSelectionRange(range);
|
||||
this.$blockScrolling -= 1;
|
||||
|
||||
var cursor = this.getCursorPosition();
|
||||
if (!this.isRowFullyVisible(cursor.row))
|
||||
this.scrollToLine(cursor.row, true);
|
||||
|
||||
//@todo scroll X
|
||||
//if (!this.isRowFullyVisible(cursor.row))
|
||||
//this.scrollToLine(cursor.row, true);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -13009,13 +13019,41 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.session.setScrollTop(row * this.lineHeight);
|
||||
};
|
||||
|
||||
//@todo I would like to make this animation a setting. How?
|
||||
|
||||
var STEPS = 10;
|
||||
function calcSteps(fromValue, toValue){
|
||||
var i = 0,
|
||||
l = STEPS - 1,
|
||||
steps = [fromValue],
|
||||
func = function(t, x_min, dx) {
|
||||
if ((t /= .5) < 1)
|
||||
return dx / 2 * Math.pow(t, 3) + x_min;
|
||||
return dx / 2 * (Math.pow(t - 2, 3) + 2) + x_min;
|
||||
};
|
||||
|
||||
for (i = 0; i < l; ++i)
|
||||
steps.push(func(i / STEPS, fromValue, toValue - fromValue));
|
||||
steps.push(toValue);
|
||||
|
||||
return steps;
|
||||
}
|
||||
|
||||
this.scrollToLine = function(line, center) {
|
||||
var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
|
||||
var offset = pos.top;
|
||||
if (center)
|
||||
offset -= this.$size.scrollerHeight / 2;
|
||||
|
||||
this.session.setScrollTop(offset);
|
||||
var i = 0, _self = this,
|
||||
steps = calcSteps(this.scrollTop, offset);
|
||||
clearInterval(_self.$timer);
|
||||
this.$timer = setInterval(function(){
|
||||
_self.session.setScrollTop(steps[i]);
|
||||
|
||||
if (++i == STEPS)
|
||||
clearInterval(_self.$timer);
|
||||
}, 10);
|
||||
};
|
||||
|
||||
this.scrollToY = function(scrollTop) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue