commit
e316578832
14 changed files with 132 additions and 49 deletions
|
|
@ -617,11 +617,29 @@ env.editor.setOptions({
|
||||||
});
|
});
|
||||||
|
|
||||||
// allow easy access to ace in console, but not in ace code which uses strict
|
// allow easy access to ace in console, but not in ace code which uses strict
|
||||||
function isNonStrict() {
|
void function() {
|
||||||
try { return !!arguments.callee.caller.caller }
|
function isStrict() {
|
||||||
catch(e){ return false }
|
try { return !arguments.callee.caller.caller.caller}
|
||||||
|
catch(e){ return true }
|
||||||
}
|
}
|
||||||
window.__defineGetter__("ace", function(){ return isNonStrict() && env.editor });
|
function warn() {
|
||||||
window.__defineGetter__("editor", function(){ return isNonStrict() && env.editor });
|
if (isStrict()) {
|
||||||
window.__defineGetter__("session", function(){ return isNonStrict() && env.editor.session });
|
console.error("trying to access to global variable");
|
||||||
window.__defineGetter__("split", function(){ return isNonStrict() && env.split });
|
}
|
||||||
|
}
|
||||||
|
function def(o, key, get) {
|
||||||
|
Object.defineProperty(o, key, {
|
||||||
|
configurable: true,
|
||||||
|
get: get,
|
||||||
|
set: function(val) {
|
||||||
|
delete o[key];
|
||||||
|
o[key] = val;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
def(window, "ace", function(){ warn(); return env.editor });
|
||||||
|
def(window, "editor", function(){ warn(); return env.editor });
|
||||||
|
def(window, "session", function(){ warn(); return env.editor.session });
|
||||||
|
def(window, "split", function(){ warn(); return env.split });
|
||||||
|
|
||||||
|
}();
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 48 KiB |
|
|
@ -16,9 +16,8 @@ body {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#logo {
|
#c9-logo, #ace-logo {
|
||||||
padding: 15px;
|
padding: 0;
|
||||||
margin-left: 70px;
|
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,10 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="optionsPanel" style="position:absolute;height:100%;width:260px">
|
<div id="optionsPanel" style="position:absolute;height:100%;width:260px">
|
||||||
<a href="http://ajaxorg.github.com/ace/" >
|
<a href="http://c9.io" title="Cloud9 IDE | Your code anywhere, anytime">
|
||||||
<img id="logo" src="demo/kitchen-sink/logo.png">
|
<img id="c9-logo" src="demo/kitchen-sink/logo.png" style="width: 172px;margin: -9px 30px -12px 51px;">
|
||||||
</a>
|
</a>
|
||||||
<div style="position: absolute; overflow: hidden; top:80px; bottom:0">
|
<div style="position: absolute; overflow: hidden; top:100px; bottom:0">
|
||||||
<div style="width: 120%; height:100%; overflow-y: scroll">
|
<div style="width: 120%; height:100%; overflow-y: scroll">
|
||||||
|
|
||||||
<table id="controls">
|
<table id="controls">
|
||||||
|
|
@ -293,6 +293,10 @@
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<a href="http://ace.c9.io">
|
||||||
|
<img id="ace-logo" src="doc/site/images/ace-logo.png" style="width: 134px;margin: 46px 0px 4px 66px;">
|
||||||
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,6 @@ var Autocomplete = function() {
|
||||||
|
|
||||||
this.popup.show(pos, lineHeight);
|
this.popup.show(pos, lineHeight);
|
||||||
}
|
}
|
||||||
renderer.updateText();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.detach = function() {
|
this.detach = function() {
|
||||||
|
|
@ -224,7 +223,7 @@ var Autocomplete = function() {
|
||||||
editor.on("mousewheel", this.mousewheelListener);
|
editor.on("mousewheel", this.mousewheelListener);
|
||||||
|
|
||||||
this.updateCompletions();
|
this.updateCompletions();
|
||||||
}
|
};
|
||||||
|
|
||||||
this.updateCompletions = function(keepPopupPosition) {
|
this.updateCompletions = function(keepPopupPosition) {
|
||||||
if (keepPopupPosition && this.base && this.completions) {
|
if (keepPopupPosition && this.base && this.completions) {
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,8 @@ var AcePopup = function(parentNode) {
|
||||||
popup.renderer.content.style.cursor = "default";
|
popup.renderer.content.style.cursor = "default";
|
||||||
popup.renderer.setStyle("ace_autocomplete");
|
popup.renderer.setStyle("ace_autocomplete");
|
||||||
|
|
||||||
|
popup.setOption("displayIndentGuides", false);
|
||||||
|
|
||||||
var noop = function(){};
|
var noop = function(){};
|
||||||
|
|
||||||
popup.focus = noop;
|
popup.focus = noop;
|
||||||
|
|
@ -102,16 +104,22 @@ var AcePopup = function(parentNode) {
|
||||||
hoverMarker.id = null;
|
hoverMarker.id = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
popup.setSelectOnHover(false)
|
popup.setSelectOnHover(false);
|
||||||
popup.on("mousemove", function(e) {
|
popup.on("mousemove", function(e) {
|
||||||
|
if (!lastMouseEvent) {
|
||||||
|
lastMouseEvent = e;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
lastMouseEvent = e;
|
lastMouseEvent = e;
|
||||||
lastMouseEvent.scrollTop = popup.renderer.scrollTop;
|
lastMouseEvent.scrollTop = popup.renderer.scrollTop;
|
||||||
var row = lastMouseEvent.getDocumentPosition().row;
|
var row = lastMouseEvent.getDocumentPosition().row;
|
||||||
if (hoverMarker.start.row != row) {
|
if (hoverMarker.start.row != row) {
|
||||||
popup.session._emit("changeBackMarker");
|
|
||||||
if (!hoverMarker.id)
|
if (!hoverMarker.id)
|
||||||
popup.setRow(row);
|
popup.setRow(row);
|
||||||
hoverMarker.start.row = hoverMarker.end.row = row;
|
setHoverMarker(row);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
popup.renderer.on("beforeRender", function() {
|
popup.renderer.on("beforeRender", function() {
|
||||||
|
|
@ -120,13 +128,34 @@ var AcePopup = function(parentNode) {
|
||||||
var row = lastMouseEvent.getDocumentPosition().row;
|
var row = lastMouseEvent.getDocumentPosition().row;
|
||||||
if (!hoverMarker.id)
|
if (!hoverMarker.id)
|
||||||
popup.setRow(row);
|
popup.setRow(row);
|
||||||
hoverMarker.start.row = hoverMarker.end.row = row;
|
setHoverMarker(row, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var hideHoverMarker = function() {
|
popup.renderer.on("afterRender", function() {
|
||||||
hoverMarker.start.row = hoverMarker.end.row = -1;
|
var row = popup.getRow();
|
||||||
popup.session._emit("changeBackMarker");
|
var t = popup.renderer.$textLayer;
|
||||||
|
var selected = t.element.childNodes[row - t.config.firstRow];
|
||||||
|
if (selected == t.selectedNode)
|
||||||
|
return;
|
||||||
|
if (t.selectedNode)
|
||||||
|
dom.removeCssClass(t.selectedNode, "ace_selected");
|
||||||
|
t.selectedNode = selected;
|
||||||
|
if (selected)
|
||||||
|
dom.addCssClass(selected, "ace_selected");
|
||||||
|
});
|
||||||
|
var hideHoverMarker = function() { setHoverMarker(-1) };
|
||||||
|
var setHoverMarker = function(row, suppressRedraw) {
|
||||||
|
if (row !== hoverMarker.start.row) {
|
||||||
|
hoverMarker.start.row = hoverMarker.end.row = row;
|
||||||
|
if (!suppressRedraw)
|
||||||
|
popup.session._emit("changeBackMarker");
|
||||||
|
popup._emit("changeHoverMarker");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
popup.getHoveredRow = function() {
|
||||||
|
return hoverMarker.start.row;
|
||||||
|
};
|
||||||
|
|
||||||
event.addListener(popup.container, "mouseout", hideHoverMarker);
|
event.addListener(popup.container, "mouseout", hideHoverMarker);
|
||||||
popup.on("hide", hideHoverMarker);
|
popup.on("hide", hideHoverMarker);
|
||||||
popup.on("changeSelection", hideHoverMarker);
|
popup.on("changeSelection", hideHoverMarker);
|
||||||
|
|
@ -173,6 +202,7 @@ var AcePopup = function(parentNode) {
|
||||||
return tokens;
|
return tokens;
|
||||||
};
|
};
|
||||||
bgTokenizer.$updateOnChange = noop;
|
bgTokenizer.$updateOnChange = noop;
|
||||||
|
bgTokenizer.start = noop;
|
||||||
|
|
||||||
popup.session.$computeWidth = function() {
|
popup.session.$computeWidth = function() {
|
||||||
return this.screenWidth = 0;
|
return this.screenWidth = 0;
|
||||||
|
|
@ -183,6 +213,7 @@ var AcePopup = function(parentNode) {
|
||||||
popup.setData = function(list) {
|
popup.setData = function(list) {
|
||||||
popup.data = list || [];
|
popup.data = list || [];
|
||||||
popup.setValue(lang.stringRepeat("\n", list.length), -1);
|
popup.setValue(lang.stringRepeat("\n", list.length), -1);
|
||||||
|
popup.setRow(0);
|
||||||
};
|
};
|
||||||
popup.getData = function(row) {
|
popup.getData = function(row) {
|
||||||
return popup.data[row];
|
return popup.data[row];
|
||||||
|
|
@ -192,29 +223,35 @@ var AcePopup = function(parentNode) {
|
||||||
return selectionMarker.start.row;
|
return selectionMarker.start.row;
|
||||||
};
|
};
|
||||||
popup.setRow = function(line) {
|
popup.setRow = function(line) {
|
||||||
|
line = Math.max(-1, Math.min(this.data.length, line));
|
||||||
if (selectionMarker.start.row != line) {
|
if (selectionMarker.start.row != line) {
|
||||||
popup.selection.clearSelection();
|
popup.selection.clearSelection();
|
||||||
selectionMarker.start.row = selectionMarker.end.row = line || 0;
|
selectionMarker.start.row = selectionMarker.end.row = line || 0;
|
||||||
popup.session._emit("changeBackMarker");
|
popup.session._emit("changeBackMarker");
|
||||||
popup.moveCursorTo(line || 0, 0);
|
popup.moveCursorTo(line || 0, 0);
|
||||||
|
if (popup.isOpen)
|
||||||
|
popup._signal("select");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
popup.hide = function() {
|
popup.hide = function() {
|
||||||
this.container.style.display = "none";
|
this.container.style.display = "none";
|
||||||
this._signal("hide");
|
this._signal("hide");
|
||||||
|
popup.isOpen = false;
|
||||||
};
|
};
|
||||||
popup.show = function(pos, lineHeight) {
|
popup.show = function(pos, lineHeight) {
|
||||||
var el = this.container;
|
var el = this.container;
|
||||||
var screenHeight = window.innerHeight;
|
var screenHeight = window.innerHeight;
|
||||||
var renderer = this.renderer;
|
var renderer = this.renderer;
|
||||||
var maxH = renderer.$maxLines * lineHeight;
|
// var maxLines = Math.min(renderer.$maxLines, this.session.getLength());
|
||||||
if (pos.top +maxH > screenHeight - lineHeight) {
|
var maxH = renderer.$maxLines * lineHeight * 1.4;
|
||||||
|
var top = pos.top + this.$borderSize;
|
||||||
|
if (top + maxH > screenHeight - lineHeight) {
|
||||||
el.style.top = "";
|
el.style.top = "";
|
||||||
el.style.bottom = screenHeight - pos.top + "px";
|
el.style.bottom = screenHeight - top + "px";
|
||||||
} else {
|
} else {
|
||||||
pos.top += lineHeight;
|
top += lineHeight;
|
||||||
el.style.top = pos.top + "px";
|
el.style.top = top + "px";
|
||||||
el.style.bottom = "";
|
el.style.bottom = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -223,11 +260,16 @@ var AcePopup = function(parentNode) {
|
||||||
this.renderer.$textLayer.checkForSizeChanges();
|
this.renderer.$textLayer.checkForSizeChanges();
|
||||||
|
|
||||||
this._signal("show");
|
this._signal("show");
|
||||||
|
lastMouseEvent = null;
|
||||||
|
popup.isOpen = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
popup.getTextLeftOffset = function() {
|
popup.getTextLeftOffset = function() {
|
||||||
return 1 + this.renderer.layerConfig.padding;
|
return this.$borderSize + this.renderer.$padding + this.$imageSize;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
popup.$imageSize = 0;
|
||||||
|
popup.$borderSize = 1;
|
||||||
|
|
||||||
return popup;
|
return popup;
|
||||||
};
|
};
|
||||||
|
|
@ -239,10 +281,12 @@ dom.importCssString("\
|
||||||
}\
|
}\
|
||||||
.ace_autocomplete.ace-tm .ace_line-hover {\
|
.ace_autocomplete.ace-tm .ace_line-hover {\
|
||||||
border: 1px solid #abbffe;\
|
border: 1px solid #abbffe;\
|
||||||
position: absolute;\
|
|
||||||
background: rgba(233,233,253,0.4);\
|
|
||||||
z-index: 2;\
|
|
||||||
margin-top: -1px;\
|
margin-top: -1px;\
|
||||||
|
background: rgba(233,233,253,0.4);\
|
||||||
|
}\
|
||||||
|
.ace_autocomplete .ace_line-hover {\
|
||||||
|
position: absolute;\
|
||||||
|
z-index: 2;\
|
||||||
}\
|
}\
|
||||||
.ace_rightAlignedText {\
|
.ace_rightAlignedText {\
|
||||||
color: gray;\
|
color: gray;\
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,8 @@ var BackgroundTokenizer = function(tokenizer, editor) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.scheduleStart = function() {
|
this.scheduleStart = function() {
|
||||||
this.running = setTimeout(this.$worker, 700);
|
if (!this.running)
|
||||||
|
this.running = setTimeout(this.$worker, 700);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$updateOnChange = function(delta) {
|
this.$updateOnChange = function(delta) {
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ exports.moduleUrl = function(name, component) {
|
||||||
var sep = component == "snippets" ? "/" : "-";
|
var sep = component == "snippets" ? "/" : "-";
|
||||||
var base = parts[parts.length - 1];
|
var base = parts[parts.length - 1];
|
||||||
if (sep == "-") {
|
if (sep == "-") {
|
||||||
var re = new RegExp("^" + component + "[\-_]|[\-_]" + component + "$", "g");
|
var re = new RegExp("^" + component + "[\\-_]|[\\-_]" + component + "$", "g");
|
||||||
base = base.replace(re, "");
|
base = base.replace(re, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -113,7 +113,7 @@ exports.loadModule = function(moduleName, onLoad) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
module = require(moduleName);
|
module = require(moduleName);
|
||||||
} catch (e) {};
|
} catch (e) {}
|
||||||
// require(moduleName) can return empty object if called after require([moduleName], callback)
|
// require(moduleName) can return empty object if called after require([moduleName], callback)
|
||||||
if (module && !exports.$loading[moduleName])
|
if (module && !exports.$loading[moduleName])
|
||||||
return onLoad && onLoad(module);
|
return onLoad && onLoad(module);
|
||||||
|
|
@ -218,8 +218,8 @@ var optionsProvider = {
|
||||||
return;
|
return;
|
||||||
var opt = this.$options[name];
|
var opt = this.$options[name];
|
||||||
if (!opt) {
|
if (!opt) {
|
||||||
if (typeof console != "undefined" && console.error)
|
if (typeof console != "undefined" && console.warn)
|
||||||
console.error('misspelled option "' + name + '"');
|
console.warn('misspelled option "' + name + '"');
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
if (opt.forwardTo)
|
if (opt.forwardTo)
|
||||||
|
|
@ -233,8 +233,8 @@ var optionsProvider = {
|
||||||
getOption: function(name) {
|
getOption: function(name) {
|
||||||
var opt = this.$options[name];
|
var opt = this.$options[name];
|
||||||
if (!opt) {
|
if (!opt) {
|
||||||
if (typeof console != "undefined" && console.error)
|
if (typeof console != "undefined" && console.warn)
|
||||||
console.error('misspelled option "' + name + '"');
|
console.warn('misspelled option "' + name + '"');
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
if (opt.forwardTo)
|
if (opt.forwardTo)
|
||||||
|
|
@ -280,7 +280,7 @@ exports.setDefaultValue = function(path, name, value) {
|
||||||
var opts = defaultOptions[path] || (defaultOptions[path] = {});
|
var opts = defaultOptions[path] || (defaultOptions[path] = {});
|
||||||
if (opts[name]) {
|
if (opts[name]) {
|
||||||
if (opts.forwardTo)
|
if (opts.forwardTo)
|
||||||
exports.setDefaultValue(opts.forwardTo, name, value)
|
exports.setDefaultValue(opts.forwardTo, name, value);
|
||||||
else
|
else
|
||||||
opts[name].value = value;
|
opts[name].value = value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,16 +41,23 @@ function HashHandler(config, platform) {
|
||||||
|
|
||||||
// todo remove this after a while
|
// todo remove this after a while
|
||||||
if (this.__defineGetter__ && this.__defineSetter__ && typeof console != "undefined" && console.error) {
|
if (this.__defineGetter__ && this.__defineSetter__ && typeof console != "undefined" && console.error) {
|
||||||
|
var warned = false;
|
||||||
|
var warn = function() {
|
||||||
|
if (!warned) {
|
||||||
|
warned = true;
|
||||||
|
console.error("commmandKeyBinding has too many m's. use commandKeyBinding");
|
||||||
|
}
|
||||||
|
};
|
||||||
this.__defineGetter__("commmandKeyBinding", function() {
|
this.__defineGetter__("commmandKeyBinding", function() {
|
||||||
console.error("commmandKeyBinding has too many m's. use commandKeyBinding")
|
warn();
|
||||||
return this.commandKeyBinding;
|
return this.commandKeyBinding;
|
||||||
});
|
});
|
||||||
this.__defineSetter__("commmandKeyBinding", function(val) {
|
this.__defineSetter__("commmandKeyBinding", function(val) {
|
||||||
console.error("commmandKeyBinding has too many m's. use commandKeyBinding")
|
warn();
|
||||||
return this.commandKeyBinding = val;
|
return this.commandKeyBinding = val;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.commmandKeyBinding = commandKeyBinding;
|
this.commmandKeyBinding = this.commandKeyBinding;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.addCommands(config);
|
this.addCommands(config);
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ var Gutter = function(parentEl) {
|
||||||
this.$cells[index] = cell;
|
this.$cells[index] = cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
var className = "ace_gutter-cell";
|
var className = "ace_gutter-cell ";
|
||||||
if (breakpoints[row])
|
if (breakpoints[row])
|
||||||
className += breakpoints[row];
|
className += breakpoints[row];
|
||||||
if (decorations[row])
|
if (decorations[row])
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ var VBScriptHighlightRules = function() {
|
||||||
token: [
|
token: [
|
||||||
"support.function.asp"
|
"support.function.asp"
|
||||||
],
|
],
|
||||||
regex: "(?:\\b(Lock|Unlock|SetAbort|SetComplete|BianryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b)"
|
regex: "(?:\\b(Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
token: [
|
token: [
|
||||||
|
|
|
||||||
|
|
@ -374,9 +374,15 @@ var SnippetManager = function() {
|
||||||
this.$getScope = function(editor) {
|
this.$getScope = function(editor) {
|
||||||
var scope = editor.session.$mode.$id || "";
|
var scope = editor.session.$mode.$id || "";
|
||||||
scope = scope.split("/").pop();
|
scope = scope.split("/").pop();
|
||||||
if (editor.session.$mode.$modes) {
|
if (scope === "html" || scope === "php") {
|
||||||
|
// PHP is actually HTML
|
||||||
|
if (scope === "php")
|
||||||
|
scope = "html";
|
||||||
var c = editor.getCursorPosition()
|
var c = editor.getCursorPosition()
|
||||||
var state = editor.session.getState(c.row);
|
var state = editor.session.getState(c.row);
|
||||||
|
if (typeof state === "object") {
|
||||||
|
state = state[0];
|
||||||
|
}
|
||||||
if (state.substring) {
|
if (state.substring) {
|
||||||
if (state.substring(0, 3) == "js-")
|
if (state.substring(0, 3) == "js-")
|
||||||
scope = "javascript";
|
scope = "javascript";
|
||||||
|
|
@ -386,6 +392,7 @@ var SnippetManager = function() {
|
||||||
scope = "php";
|
scope = "php";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return scope;
|
return scope;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1335,8 +1335,10 @@ var VirtualRenderer = function(container, theme) {
|
||||||
- this.layerConfig.maxHeight - (this.$size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd
|
- this.layerConfig.maxHeight - (this.$size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd
|
||||||
< -1 + this.scrollMargin.bottom)
|
< -1 + this.scrollMargin.bottom)
|
||||||
return true;
|
return true;
|
||||||
// todo: better handle horizontal scrolling
|
if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)
|
||||||
if (deltaX)
|
return true;
|
||||||
|
if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth
|
||||||
|
- this.layerConfig.width < -1 + this.scrollMargin.right)
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1481,7 +1483,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
dom.addCssClass(_self.container, module.cssClass);
|
dom.addCssClass(_self.container, module.cssClass);
|
||||||
dom.setCssClass(_self.container, "ace_dark", module.isDark);
|
dom.setCssClass(_self.container, "ace_dark", module.isDark);
|
||||||
|
|
||||||
var padding = module.padding || 4;
|
var padding = "padding" in module ? module.padding : 4;
|
||||||
if (_self.$padding && padding != _self.$padding)
|
if (_self.$padding && padding != _self.$padding)
|
||||||
_self.setPadding(padding);
|
_self.setPadding(padding);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,8 @@ window.require = function(parentId, id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var chunks = id.split("/");
|
var chunks = id.split("/");
|
||||||
|
if (!require.tlns)
|
||||||
|
return console.log("unable to load " + id);
|
||||||
chunks[0] = require.tlns[chunks[0]] || chunks[0];
|
chunks[0] = require.tlns[chunks[0]] || chunks[0];
|
||||||
var path = chunks.join("/") + ".js";
|
var path = chunks.join("/") + ".js";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue