Updated codemirror to support panel and match-highlighter and revert some unnecessary changes

This commit is contained in:
Wu Cheng-Han 2015-09-24 13:57:10 +08:00
parent 33cdec2fd4
commit 6e40df2887
8 changed files with 27 additions and 23 deletions

View file

@ -75,13 +75,14 @@
this.screen = clientSize;
this.total = scrollSize;
this.size = barSize;
var buttonSize = this.screen * (this.size / this.total);
if (buttonSize < minButtonSize) {
this.size -= minButtonSize - buttonSize;
buttonSize = minButtonSize;
}
this.inner.style[this.orientation == "horizontal" ? "width" : "height"] =
(buttonSize - 4) + "px";
buttonSize + "px";
this.inner.style[this.orientation == "horizontal" ? "left" : "top"] =
this.pos * (this.size / this.total) + "px";
};