kopia lustrzana https://github.com/c9/core
add scrollbar min width
rodzic
4c45b459a4
commit
721cb0d8f3
|
@ -98,6 +98,7 @@ var VScrollBar = function(parent, renderer) {
|
|||
this.width = dom.scrollbarWidth(parent.ownerDocument);
|
||||
this.inner.style.width =
|
||||
this.element.style.width = (this.width || 15) + 5 + "px";
|
||||
this.$minWidth = 0;
|
||||
};
|
||||
|
||||
oop.inherits(VScrollBar, ScrollBar);
|
||||
|
@ -124,7 +125,7 @@ oop.inherits(VScrollBar, ScrollBar);
|
|||
* @returns {Number}
|
||||
**/
|
||||
this.getWidth = function() {
|
||||
return this.isVisible ? this.width : 0;
|
||||
return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
"c9"
|
||||
],
|
||||
"c9plugins": {
|
||||
"c9.ide.language": "#ff78609c3f",
|
||||
"c9.ide.language": "#2a4a36fc18",
|
||||
"c9.ide.language.css": "#a649f2a710",
|
||||
"c9.ide.language.generic": "#77d43cfaf0",
|
||||
"c9.ide.language.html": "#0f4078c187",
|
||||
|
@ -106,7 +106,7 @@
|
|||
"c9.ide.run.build": "#0598fff697",
|
||||
"c9.ide.run.debug.xdebug": "#61dcbd0180",
|
||||
"c9.ide.save": "#e00549cb0f",
|
||||
"c9.ide.scm": "#0bccfb982b",
|
||||
"c9.ide.scm": "#b07648109a",
|
||||
"c9.ide.terminal.monitor": "#b76f1c9f24",
|
||||
"c9.ide.test": "#9cbf45fb56",
|
||||
"c9.ide.test.mocha": "#3126bb6416",
|
||||
|
|
|
@ -278,9 +278,9 @@ define(function(require, exports, module) {
|
|||
tree.renderer.on("scrollbarVisibilityChanged", updateScrollBarSize);
|
||||
tree.renderer.on("resize", 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";
|
||||
tree.renderer.scroller.style.right = Math.max(w, 10) + "px";
|
||||
}
|
||||
|
||||
tree.on("drop", function(e) {
|
||||
|
|
Ładowanie…
Reference in New Issue