add scrollbar min width

pull/223/head
nightwing 2015-09-25 20:28:15 +00:00
rodzic 4c45b459a4
commit 721cb0d8f3
3 zmienionych plików z 6 dodań i 5 usunięć

3
node_modules/ace/lib/ace/scrollbar.js wygenerowano vendored
Wyświetl plik

@ -98,6 +98,7 @@ var VScrollBar = function(parent, renderer) {
this.width = dom.scrollbarWidth(parent.ownerDocument); this.width = dom.scrollbarWidth(parent.ownerDocument);
this.inner.style.width = this.inner.style.width =
this.element.style.width = (this.width || 15) + 5 + "px"; this.element.style.width = (this.width || 15) + 5 + "px";
this.$minWidth = 0;
}; };
oop.inherits(VScrollBar, ScrollBar); oop.inherits(VScrollBar, ScrollBar);
@ -124,7 +125,7 @@ oop.inherits(VScrollBar, ScrollBar);
* @returns {Number} * @returns {Number}
**/ **/
this.getWidth = function() { this.getWidth = function() {
return this.isVisible ? this.width : 0; return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0);
}; };
/** /**

Wyświetl plik

@ -55,7 +55,7 @@
"c9" "c9"
], ],
"c9plugins": { "c9plugins": {
"c9.ide.language": "#ff78609c3f", "c9.ide.language": "#2a4a36fc18",
"c9.ide.language.css": "#a649f2a710", "c9.ide.language.css": "#a649f2a710",
"c9.ide.language.generic": "#77d43cfaf0", "c9.ide.language.generic": "#77d43cfaf0",
"c9.ide.language.html": "#0f4078c187", "c9.ide.language.html": "#0f4078c187",
@ -106,7 +106,7 @@
"c9.ide.run.build": "#0598fff697", "c9.ide.run.build": "#0598fff697",
"c9.ide.run.debug.xdebug": "#61dcbd0180", "c9.ide.run.debug.xdebug": "#61dcbd0180",
"c9.ide.save": "#e00549cb0f", "c9.ide.save": "#e00549cb0f",
"c9.ide.scm": "#0bccfb982b", "c9.ide.scm": "#b07648109a",
"c9.ide.terminal.monitor": "#b76f1c9f24", "c9.ide.terminal.monitor": "#b76f1c9f24",
"c9.ide.test": "#9cbf45fb56", "c9.ide.test": "#9cbf45fb56",
"c9.ide.test.mocha": "#3126bb6416", "c9.ide.test.mocha": "#3126bb6416",

Wyświetl plik

@ -278,9 +278,9 @@ define(function(require, exports, module) {
tree.renderer.on("scrollbarVisibilityChanged", updateScrollBarSize); tree.renderer.on("scrollbarVisibilityChanged", updateScrollBarSize);
tree.renderer.on("resize", updateScrollBarSize); tree.renderer.on("resize", updateScrollBarSize);
function updateScrollBarSize() { function updateScrollBarSize() {
var w = tree.renderer.scrollBarV.getWidth(); var scrollBarV = tree.renderer.scrollBarV;
var w = scrollBarV.isVisible ? scrollBarV.getWidth() : 0;
btnTreeSettings.$ext.style.marginRight = Math.max(w - 2, 0) + "px"; btnTreeSettings.$ext.style.marginRight = Math.max(w - 2, 0) + "px";
tree.renderer.scroller.style.right = Math.max(w, 10) + "px";
} }
tree.on("drop", function(e) { tree.on("drop", function(e) {