add missing options

This commit is contained in:
nightwing 2013-03-14 16:54:07 +04:00
commit b61ae38c14
4 changed files with 25 additions and 13 deletions

View file

@ -491,10 +491,7 @@ var EditSession = function(text, mode) {
*
**/
this.setOverwrite = function(overwrite) {
if (this.$overwrite == overwrite) return;
this.$overwrite = overwrite;
this._emit("changeOverwrite");
this.setOption("overwrite", overwrite)
};
/**
@ -2437,6 +2434,15 @@ config.defineOptions(EditSession.prototype, "session", {
},
initialValue: 4,
handlesSet: true
},
overwrite: {
set: function(val) {this._emit("changeOverwrite");},
initialValue: false
},
newLineMode: {
set: function(val) {this.doc.setNewLineMode(val)},
get: function() {return this.doc.getNewLineMode(newLineMode)},
handlesSet: true
}
});

View file

@ -2219,6 +2219,7 @@ config.defineOptions(Editor.prototype, "editor", {
behavioursEnabled: {initialValue: true},
wrapBehavioursEnabled: {initialValue: true},
hScrollBarAlwaysVisible: "renderer",
highlightGutterLine: "renderer",
animatedScroll: "renderer",
showInvisibles: "renderer",
@ -2234,6 +2235,8 @@ config.defineOptions(Editor.prototype, "editor", {
focusTimout: "$mouseHandler",
firstLineNumber: "session",
overwrite: "session",
newLineMode: "session",
useWorker: "session",
useSoftTabs: "session",
tabSize: "session",

View file

@ -137,7 +137,7 @@ var MouseHandler = function(editor) {
}).call(MouseHandler.prototype);
config.defineOptions(MouseHandler.prototype, "mouseHandler", {
scrollSpeed: {initialValue: 1},
scrollSpeed: {initialValue: 2},
dragDelay: {initialValue: 150},
focusTimout: {initialValue: 0}
});

View file

@ -102,7 +102,6 @@ var VirtualRenderer = function(container, theme) {
// Indicates whether the horizontal scrollbar is visible
this.$horizScroll = false;
this.$horizScrollAlwaysVisible = false;
this.scrollBar = new ScrollBar(this.container);
this.scrollBar.addEventListener("scroll", function(e) {
@ -615,7 +614,7 @@ var VirtualRenderer = function(container, theme) {
* @returns {Boolean}
**/
this.getHScrollBarAlwaysVisible = function() {
return this.$horizScrollAlwaysVisible;
return this.$hScrollBarAlwaysVisible;
};
/**
@ -625,11 +624,7 @@ var VirtualRenderer = function(container, theme) {
*
**/
this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
if (this.$horizScrollAlwaysVisible != alwaysVisible) {
this.$horizScrollAlwaysVisible = alwaysVisible;
if (!this.$horizScrollAlwaysVisible || !this.$horizScroll)
this.$loop.schedule(this.CHANGE_SCROLL);
}
this.setOption("hScrollBarAlwaysVisible", alwaysVisible);
};
this.$updateScrollBar = function() {
@ -744,7 +739,7 @@ var VirtualRenderer = function(container, theme) {
var longestLine = this.$getLongestLine();
var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
var horizScroll = this.$hScrollBarAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
var horizScrollChanged = this.$horizScroll !== horizScroll;
this.$horizScroll = horizScroll;
if (horizScrollChanged) {
@ -1398,6 +1393,14 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", {
},
initialValue: false,
value: true
},
hScrollBarAlwaysVisible: {
set: function(alwaysVisible) {
this.$hScrollBarAlwaysVisible = alwaysVisible;
if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll)
this.$loop.schedule(this.CHANGE_SCROLL);
},
initialValue: false
}
});