diff options
author | Wu Cheng-Han | 2016-01-17 14:28:04 -0600 |
---|---|---|
committer | Wu Cheng-Han | 2016-01-17 14:28:04 -0600 |
commit | eaa8ccaccb1091820d0a8d1223996a6dd057347d (patch) | |
tree | 6b4aaa3b3d1a2fed68147510142663222533775a /public/vendor/codemirror/addon/scroll/annotatescrollbar.js | |
parent | ce65e58096d57ace02723d11a125673f9d48c293 (diff) |
Upgrade CodeMirror to 5.10.1 and now support fullscreen, jump-to-line in editor
Diffstat (limited to 'public/vendor/codemirror/addon/scroll/annotatescrollbar.js')
-rw-r--r--[-rwxr-xr-x] | public/vendor/codemirror/addon/scroll/annotatescrollbar.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/public/vendor/codemirror/addon/scroll/annotatescrollbar.js b/public/vendor/codemirror/addon/scroll/annotatescrollbar.js index bbbfa59c..3f80f483 100755..100644 --- a/public/vendor/codemirror/addon/scroll/annotatescrollbar.js +++ b/public/vendor/codemirror/addon/scroll/annotatescrollbar.js @@ -51,7 +51,7 @@ Annotation.prototype.computeScale = function() { var cm = this.cm; var hScale = (cm.getWrapperElement().clientHeight - cm.display.barHeight - this.buttonHeight * 2) / - cm.heightAtLine(cm.lastLine() + 1, "local"); + cm.getScrollerElement().scrollHeight if (hScale != this.hScale) { this.hScale = hScale; return true; @@ -100,6 +100,9 @@ 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; + if (ann.id) { + elt.setAttribute("annotation-id", ann.id); + } } this.div.textContent = ""; this.div.appendChild(frag); |