Skip to content

Commit

Permalink
* Added animation setting for ace scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Daniels committed Apr 6, 2012
1 parent 831bf66 commit b141c13
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/apf/elements/codeeditor.js
Expand Up @@ -88,11 +88,12 @@ apf.codeeditor = module.exports = function(struct, tagName) {
this.$booleanProperties["folding"] = true;
this.$booleanProperties["wrapmode"] = true;
this.$booleanProperties["wrapmodeViewport"] = true;
this.$booleanProperties["animatedscroll"] = true;

this.$supportedProperties.push("value", "syntax", "activeline", "selectstyle",
"caching", "readonly", "showinvisibles", "showprintmargin", "printmargincolumn",
"overwrite", "tabsize", "softtabs", "debugger", "model-breakpoints", "scrollspeed",
"theme", "gutter", "highlightselectedword", "autohidehorscrollbar",
"theme", "gutter", "highlightselectedword", "autohidehorscrollbar", "animatedscroll",
"behaviors", "folding");

this.$getCacheKey = function(value) {
Expand Down Expand Up @@ -407,6 +408,10 @@ apf.codeeditor = module.exports = function(struct, tagName) {
this.$propHandlers["showinvisibles"] = function(value, prop, initial) {
this.$editor.setShowInvisibles(value);
};

this.$propHandlers["animatedscroll"] = function(value, prop, initial) {
this.$editor.setAnimatedScroll(value);
};

this.$propHandlers["overwrite"] = function(value, prop, initial) {
this.$editor.setOverwrite(value);
Expand Down Expand Up @@ -698,6 +703,8 @@ apf.codeeditor = module.exports = function(struct, tagName) {
this.softtabs = doc.getUseSoftTabs(); //true
if (this.scrollspeed === undefined)
this.scrollspeed = ed.getScrollSpeed();
if (this.animatedscroll === undefined)
this.animatedscroll = ed.getAnimatedScroll();
if (this.selectstyle === undefined)
this.selectstyle = ed.getSelectionStyle();//"line";
if (this.activeline === undefined)
Expand Down
1 change: 1 addition & 0 deletions client/ext/code/code.js
Expand Up @@ -321,6 +321,7 @@ module.exports = ext.register("ext/code/code", {
.attr("softtabs", "true")
.attr("tabsize", "4")
.attr("scrollspeed", "2")
.attr("animatedscroll", "true")
.attr("fontsize", "12")
.attr("wrapmode", "false")
.attr("wraplimitmin", "")
Expand Down
1 change: 1 addition & 0 deletions client/ext/code/code.xml
Expand Up @@ -16,6 +16,7 @@
softtabs = "[{require('ext/settings/settings').model}::editors/code/@softtabs]"
tabsize = "[{require('ext/settings/settings').model}::editors/code/@tabsize]"
scrollspeed = "[{require('ext/settings/settings').model}::editors/code/@scrollspeed]"
animatedscroll = "[{require('ext/settings/settings').model}::editors/code/@animatedscroll]"

fontsize = "[{require('ext/settings/settings').model}::editors/code/@fontsize]"
wrapmode = "[{require('ext/settings/settings').model}::editors/code/@wrapmode]"
Expand Down
1 change: 1 addition & 0 deletions client/ext/code/settings.xml
Expand Up @@ -7,6 +7,7 @@
<a:checkbox class="underlined" label="Show Gutter" value="[editors/code/@gutter]" skin="checkbox_grey" />
<a:checkbox class="underlined" label="Highlight Selected Word" value="[editors/code/@highlightselectedword]" skin="checkbox_grey" />
<a:checkbox class="underlined" label="Auto-hide Horizontal Scrollbar" value="[editors/code/@autohidehorscrollbar]" skin="checkbox_grey" />
<a:checkbox class="underlined" label="Animate Scrolling" value="[editors/code/@animatedscroll]" skin="checkbox_grey" />

<a:hbox edge="0 5 2 0" align="center" class="underlined">
<a:label flex="1">Font Size</a:label>
Expand Down

0 comments on commit b141c13

Please sign in to comment.