mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 11:15:23 -04:00
Update CodeMirror to 5.13.5
This commit is contained in:
parent
edc3a31dfd
commit
8bf516263c
84 changed files with 2837 additions and 504 deletions
|
@ -59,16 +59,20 @@
|
|||
CodeMirror.on(this.node, "DOMMouseScroll", onWheel);
|
||||
}
|
||||
|
||||
Bar.prototype.moveTo = function(pos, update) {
|
||||
Bar.prototype.setPos = function(pos) {
|
||||
if (pos < 0) pos = 0;
|
||||
if (pos > this.total - this.screen) pos = this.total - this.screen;
|
||||
if (pos == this.pos) return;
|
||||
if (pos == this.pos) return false;
|
||||
this.pos = pos;
|
||||
this.inner.style[this.orientation == "horizontal" ? "left" : "top"] =
|
||||
(pos * (this.size / this.total)) + "px";
|
||||
if (update !== false) this.scroll(pos, this.orientation);
|
||||
return true
|
||||
};
|
||||
|
||||
Bar.prototype.moveTo = function(pos) {
|
||||
if (this.setPos(pos)) this.scroll(pos, this.orientation);
|
||||
}
|
||||
|
||||
var minButtonSize = 10;
|
||||
|
||||
Bar.prototype.update = function(scrollSize, clientSize, barSize) {
|
||||
|
@ -83,8 +87,7 @@
|
|||
}
|
||||
this.inner.style[this.orientation == "horizontal" ? "width" : "height"] =
|
||||
buttonSize + "px";
|
||||
this.inner.style[this.orientation == "horizontal" ? "left" : "top"] =
|
||||
this.pos * (this.size / this.total) + "px";
|
||||
this.setPos(this.pos);
|
||||
};
|
||||
|
||||
function SimpleScrollbars(cls, place, scroll) {
|
||||
|
@ -111,7 +114,6 @@
|
|||
if (needsV) {
|
||||
this.vert.update(measure.scrollHeight, measure.clientHeight,
|
||||
measure.viewHeight - (needsH ? width : 0));
|
||||
this.vert.node.style.display = "block";
|
||||
this.vert.node.style.bottom = needsH ? width + "px" : "0";
|
||||
}
|
||||
if (needsH) {
|
||||
|
@ -125,11 +127,11 @@
|
|||
};
|
||||
|
||||
SimpleScrollbars.prototype.setScrollTop = function(pos) {
|
||||
this.vert.moveTo(pos, false);
|
||||
this.vert.setPos(pos);
|
||||
};
|
||||
|
||||
SimpleScrollbars.prototype.setScrollLeft = function(pos) {
|
||||
this.horiz.moveTo(pos, false);
|
||||
this.horiz.setPos(pos);
|
||||
};
|
||||
|
||||
SimpleScrollbars.prototype.clear = function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue