Updated codemirror to support panel and match-highlighter and revert some unnecessary changes
This commit is contained in:
parent
33cdec2fd4
commit
6e40df2887
8 changed files with 27 additions and 23 deletions
|
@ -29,4 +29,5 @@
|
|||
|
||||
.CodeMirror-dialog button {
|
||||
font-size: 70%;
|
||||
color: black;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
var height = Math.max(bottom - top, 3);
|
||||
|
||||
var elt = frag.appendChild(document.createElement("div"));
|
||||
elt.style.cssText = "position: absolute; right: 0px; width: " + Math.max(cm.display.barWidth * 2, 2) + "px; top: "
|
||||
elt.style.cssText = "position: absolute; right: 0px; width: " + Math.max(cm.display.barWidth * 1.5, 2) + "px; top: "
|
||||
+ (top + this.buttonHeight) + "px; height: " + height + "px";
|
||||
elt.className = this.options.className;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
.CodeMirror-simplescroll-horizontal {
|
||||
bottom: 0; left: 0;
|
||||
height: 8px;
|
||||
height: 6px;
|
||||
}
|
||||
.CodeMirror-simplescroll-horizontal div {
|
||||
bottom: 0;
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
.CodeMirror-simplescroll-vertical {
|
||||
right: 0; top: 0;
|
||||
width: 8px;
|
||||
width: 6px;
|
||||
}
|
||||
.CodeMirror-simplescroll-vertical div {
|
||||
right: 0;
|
||||
|
@ -39,8 +39,8 @@
|
|||
.CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div {
|
||||
position: absolute;
|
||||
background: #ccc;
|
||||
border-radius: 3px;
|
||||
margin: 2px;
|
||||
border-radius: 7px;
|
||||
border: 2px solid #222;
|
||||
}
|
||||
|
||||
.CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical {
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
.CodeMirror-overlayscroll-horizontal {
|
||||
bottom: 0; left: 0;
|
||||
height: 6px;
|
||||
height: 10px;
|
||||
}
|
||||
.CodeMirror-overlayscroll-horizontal div {
|
||||
bottom: 0;
|
||||
|
@ -58,8 +58,8 @@
|
|||
}
|
||||
|
||||
.CodeMirror-overlayscroll-vertical {
|
||||
right: 0; top: 0;
|
||||
width: 6px;
|
||||
right: 0px; top: 0px;
|
||||
width: 10px;
|
||||
}
|
||||
.CodeMirror-overlayscroll-vertical div {
|
||||
right: 0;
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
.CodeMirror-search-match {
|
||||
background: gold;
|
||||
border-top: 1px solid orange;
|
||||
border-bottom: 1px solid orange;
|
||||
border: 1px solid orange;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
opacity: .5;
|
||||
|
|
23
public/vendor/codemirror/codemirror.min.js
vendored
23
public/vendor/codemirror/codemirror.min.js
vendored
File diff suppressed because one or more lines are too long
2
public/vendor/codemirror/compress.sh
vendored
2
public/vendor/codemirror/compress.sh
vendored
|
@ -7,8 +7,10 @@ addon/selection/active-line.js \
|
|||
addon/search/searchcursor.js \
|
||||
addon/search/search.js \
|
||||
addon/search/matchesonscrollbar.js \
|
||||
addon/search/match-highlighter.js \
|
||||
addon/scroll/simplescrollbars.js \
|
||||
addon/scroll/annotatescrollbar.js \
|
||||
addon/display/panel.js \
|
||||
addon/dialog/dialog.js \
|
||||
addon/edit/matchbrackets.js \
|
||||
addon/edit/closebrackets.js \
|
||||
|
|
2
public/vendor/codemirror/lib/codemirror.js
vendored
2
public/vendor/codemirror/lib/codemirror.js
vendored
|
@ -388,7 +388,7 @@
|
|||
viewWidth: d.wrapper.clientWidth,
|
||||
barLeft: cm.options.fixedGutter ? gutterW : 0,
|
||||
docHeight: docH,
|
||||
scrollHeight: docH + scrollGap(cm) + d.barHeight + textHeight(cm.display),
|
||||
scrollHeight: docH + scrollGap(cm) + d.barHeight,
|
||||
nativeBarWidth: d.nativeBarWidth,
|
||||
gutterWidth: gutterW
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue