File manager - Edit - /home/autoph/public_html/tasks/scroll.tar
Back
simplescrollbars.css 0000644 00000002503 15025046265 0010643 0 ustar 00 .CodeMirror-simplescroll-horizontal div, .CodeMirror-simplescroll-vertical div { position: absolute; background: #ccc; -moz-box-sizing: border-box; box-sizing: border-box; border: 1px solid #bbb; border-radius: 2px; } .CodeMirror-simplescroll-horizontal, .CodeMirror-simplescroll-vertical { position: absolute; z-index: 6; background: #eee; } .CodeMirror-simplescroll-horizontal { bottom: 0; left: 0; height: 8px; } .CodeMirror-simplescroll-horizontal div { bottom: 0; height: 100%; } .CodeMirror-simplescroll-vertical { right: 0; top: 0; width: 8px; } .CodeMirror-simplescroll-vertical div { right: 0; width: 100%; } .CodeMirror-overlayscroll .CodeMirror-scrollbar-filler, .CodeMirror-overlayscroll .CodeMirror-gutter-filler { display: none; } .CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div { position: absolute; background: #bcd; border-radius: 3px; } .CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical { position: absolute; z-index: 6; } .CodeMirror-overlayscroll-horizontal { bottom: 0; left: 0; height: 6px; } .CodeMirror-overlayscroll-horizontal div { bottom: 0; height: 100%; } .CodeMirror-overlayscroll-vertical { right: 0; top: 0; width: 6px; } .CodeMirror-overlayscroll-vertical div { right: 0; width: 100%; } scrollpastend.js 0000644 00000003056 15025046265 0007770 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env mod(CodeMirror); })(function(CodeMirror) { "use strict"; CodeMirror.defineOption("scrollPastEnd", false, function(cm, val, old) { if (old && old != CodeMirror.Init) { cm.off("change", onChange); cm.off("refresh", updateBottomMargin); cm.display.lineSpace.parentNode.style.paddingBottom = ""; cm.state.scrollPastEndPadding = null; } if (val) { cm.on("change", onChange); cm.on("refresh", updateBottomMargin); updateBottomMargin(cm); } }); function onChange(cm, change) { if (CodeMirror.changeEnd(change).line == cm.lastLine()) updateBottomMargin(cm); } function updateBottomMargin(cm) { var padding = ""; if (cm.lineCount() > 1) { var totalH = cm.display.scroller.clientHeight - 30, lastLineH = cm.getLineHandle(cm.lastLine()).height; padding = (totalH - lastLineH) + "px"; } if (cm.state.scrollPastEndPadding != padding) { cm.state.scrollPastEndPadding = padding; cm.display.lineSpace.parentNode.style.paddingBottom = padding; cm.off("refresh", updateBottomMargin); cm.setSize(); cm.on("refresh", updateBottomMargin); } } }); annotatescrollbar.js 0000644 00000011024 15025046265 0010622 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env mod(CodeMirror); })(function(CodeMirror) { "use strict"; CodeMirror.defineExtension("annotateScrollbar", function(options) { if (typeof options == "string") options = {className: options}; return new Annotation(this, options); }); CodeMirror.defineOption("scrollButtonHeight", 0); function Annotation(cm, options) { this.cm = cm; this.options = options; this.buttonHeight = options.scrollButtonHeight || cm.getOption("scrollButtonHeight"); this.annotations = []; this.doRedraw = this.doUpdate = null; this.div = cm.getWrapperElement().appendChild(document.createElement("div")); this.div.style.cssText = "position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none"; this.computeScale(); function scheduleRedraw(delay) { clearTimeout(self.doRedraw); self.doRedraw = setTimeout(function() { self.redraw(); }, delay); } var self = this; cm.on("refresh", this.resizeHandler = function() { clearTimeout(self.doUpdate); self.doUpdate = setTimeout(function() { if (self.computeScale()) scheduleRedraw(20); }, 100); }); cm.on("markerAdded", this.resizeHandler); cm.on("markerCleared", this.resizeHandler); if (options.listenForChanges !== false) cm.on("changes", this.changeHandler = function() { scheduleRedraw(250); }); } Annotation.prototype.computeScale = function() { var cm = this.cm; var hScale = (cm.getWrapperElement().clientHeight - cm.display.barHeight - this.buttonHeight * 2) / cm.getScrollerElement().scrollHeight if (hScale != this.hScale) { this.hScale = hScale; return true; } }; Annotation.prototype.update = function(annotations) { this.annotations = annotations; this.redraw(); }; Annotation.prototype.redraw = function(compute) { if (compute !== false) this.computeScale(); var cm = this.cm, hScale = this.hScale; var frag = document.createDocumentFragment(), anns = this.annotations; var wrapping = cm.getOption("lineWrapping"); var singleLineH = wrapping && cm.defaultTextHeight() * 1.5; var curLine = null, curLineObj = null; function getY(pos, top) { if (curLine != pos.line) { curLine = pos.line curLineObj = cm.getLineHandle(pos.line) var visual = cm.getLineHandleVisualStart(curLineObj) if (visual != curLineObj) { curLine = cm.getLineNumber(visual) curLineObj = visual } } if ((curLineObj.widgets && curLineObj.widgets.length) || (wrapping && curLineObj.height > singleLineH)) return cm.charCoords(pos, "local")[top ? "top" : "bottom"]; var topY = cm.heightAtLine(curLineObj, "local"); return topY + (top ? 0 : curLineObj.height); } var lastLine = cm.lastLine() if (cm.display.barWidth) for (var i = 0, nextTop; i < anns.length; i++) { var ann = anns[i]; if (ann.to.line > lastLine) continue; var top = nextTop || getY(ann.from, true) * hScale; var bottom = getY(ann.to, false) * hScale; while (i < anns.length - 1) { if (anns[i + 1].to.line > lastLine) break; nextTop = getY(anns[i + 1].from, true) * hScale; if (nextTop > bottom + .9) break; ann = anns[++i]; bottom = getY(ann.to, false) * hScale; } if (bottom == top) continue; 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 - 1, 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); }; Annotation.prototype.clear = function() { this.cm.off("refresh", this.resizeHandler); this.cm.off("markerAdded", this.resizeHandler); this.cm.off("markerCleared", this.resizeHandler); if (this.changeHandler) this.cm.off("changes", this.changeHandler); this.div.parentNode.removeChild(this.div); }; }); simplescrollbars.js 0000644 00000012527 15025046265 0010476 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env mod(CodeMirror); })(function(CodeMirror) { "use strict"; function Bar(cls, orientation, scroll) { this.orientation = orientation; this.scroll = scroll; this.screen = this.total = this.size = 1; this.pos = 0; this.node = document.createElement("div"); this.node.className = cls + "-" + orientation; this.inner = this.node.appendChild(document.createElement("div")); var self = this; CodeMirror.on(this.inner, "mousedown", function(e) { if (e.which != 1) return; CodeMirror.e_preventDefault(e); var axis = self.orientation == "horizontal" ? "pageX" : "pageY"; var start = e[axis], startpos = self.pos; function done() { CodeMirror.off(document, "mousemove", move); CodeMirror.off(document, "mouseup", done); } function move(e) { if (e.which != 1) return done(); self.moveTo(startpos + (e[axis] - start) * (self.total / self.size)); } CodeMirror.on(document, "mousemove", move); CodeMirror.on(document, "mouseup", done); }); CodeMirror.on(this.node, "click", function(e) { CodeMirror.e_preventDefault(e); var innerBox = self.inner.getBoundingClientRect(), where; if (self.orientation == "horizontal") where = e.clientX < innerBox.left ? -1 : e.clientX > innerBox.right ? 1 : 0; else where = e.clientY < innerBox.top ? -1 : e.clientY > innerBox.bottom ? 1 : 0; self.moveTo(self.pos + where * self.screen); }); function onWheel(e) { var moved = CodeMirror.wheelEventPixels(e)[self.orientation == "horizontal" ? "x" : "y"]; var oldPos = self.pos; self.moveTo(self.pos + moved); if (self.pos != oldPos) CodeMirror.e_preventDefault(e); } CodeMirror.on(this.node, "mousewheel", onWheel); CodeMirror.on(this.node, "DOMMouseScroll", onWheel); } Bar.prototype.setPos = function(pos, force) { if (pos < 0) pos = 0; if (pos > this.total - this.screen) pos = this.total - this.screen; if (!force && pos == this.pos) return false; this.pos = pos; this.inner.style[this.orientation == "horizontal" ? "left" : "top"] = (pos * (this.size / this.total)) + "px"; 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) { var sizeChanged = this.screen != clientSize || this.total != scrollSize || this.size != barSize if (sizeChanged) { 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 + "px"; this.setPos(this.pos, sizeChanged); }; function SimpleScrollbars(cls, place, scroll) { this.addClass = cls; this.horiz = new Bar(cls, "horizontal", scroll); place(this.horiz.node); this.vert = new Bar(cls, "vertical", scroll); place(this.vert.node); this.width = null; } SimpleScrollbars.prototype.update = function(measure) { if (this.width == null) { var style = window.getComputedStyle ? window.getComputedStyle(this.horiz.node) : this.horiz.node.currentStyle; if (style) this.width = parseInt(style.height); } var width = this.width || 0; var needsH = measure.scrollWidth > measure.clientWidth + 1; var needsV = measure.scrollHeight > measure.clientHeight + 1; this.vert.node.style.display = needsV ? "block" : "none"; this.horiz.node.style.display = needsH ? "block" : "none"; if (needsV) { this.vert.update(measure.scrollHeight, measure.clientHeight, measure.viewHeight - (needsH ? width : 0)); this.vert.node.style.bottom = needsH ? width + "px" : "0"; } if (needsH) { this.horiz.update(measure.scrollWidth, measure.clientWidth, measure.viewWidth - (needsV ? width : 0) - measure.barLeft); this.horiz.node.style.right = needsV ? width + "px" : "0"; this.horiz.node.style.left = measure.barLeft + "px"; } return {right: needsV ? width : 0, bottom: needsH ? width : 0}; }; SimpleScrollbars.prototype.setScrollTop = function(pos) { this.vert.setPos(pos); }; SimpleScrollbars.prototype.setScrollLeft = function(pos) { this.horiz.setPos(pos); }; SimpleScrollbars.prototype.clear = function() { var parent = this.horiz.node.parentNode; parent.removeChild(this.horiz.node); parent.removeChild(this.vert.node); }; CodeMirror.scrollbarModel.simple = function(place, scroll) { return new SimpleScrollbars("CodeMirror-simplescroll", place, scroll); }; CodeMirror.scrollbarModel.overlay = function(place, scroll) { return new SimpleScrollbars("CodeMirror-overlayscroll", place, scroll); }; });
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings