mirror of
https://github.com/documize/community.git
synced 2025-07-28 17:49:41 +02:00
Update CodeMirror dep to v5.42.2
Affects Code and Markdown section types
This commit is contained in:
parent
c706edec47
commit
479a61a3ef
347 changed files with 21845 additions and 20770 deletions
10
gui/public/codemirror/addon/display/panel.js
vendored
10
gui/public/codemirror/addon/display/panel.js
vendored
|
@ -1,5 +1,5 @@
|
|||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
|
@ -17,13 +17,15 @@
|
|||
var info = this.state.panels;
|
||||
var wrapper = info.wrapper;
|
||||
var cmWrapper = this.getWrapperElement();
|
||||
var replace = options.replace instanceof Panel && !options.replace.cleared;
|
||||
|
||||
if (options.after instanceof Panel && !options.after.cleared) {
|
||||
wrapper.insertBefore(node, options.before.node.nextSibling);
|
||||
} else if (options.before instanceof Panel && !options.before.cleared) {
|
||||
wrapper.insertBefore(node, options.before.node);
|
||||
} else if (options.replace instanceof Panel && !options.replace.cleared) {
|
||||
} else if (replace) {
|
||||
wrapper.insertBefore(node, options.replace.node);
|
||||
info.panels++;
|
||||
options.replace.clear();
|
||||
} else if (options.position == "bottom") {
|
||||
wrapper.appendChild(node);
|
||||
|
@ -37,7 +39,9 @@
|
|||
|
||||
var height = (options && options.height) || node.offsetHeight;
|
||||
this._setSize(null, info.heightLeft -= height);
|
||||
info.panels++;
|
||||
if (!replace) {
|
||||
info.panels++;
|
||||
}
|
||||
if (options.stable && isAtTop(this, node))
|
||||
this.scrollTo(null, this.getScrollInfo().top + height)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue