From 60c401fe208aa2ae27debbe1bd5fb4961032b0f0 Mon Sep 17 00:00:00 2001 From: obgnail Date: Sat, 24 Aug 2024 22:03:28 +0800 Subject: [PATCH] update markmap --- plugin/export_enhance.js | 2 +- plugin/markmap/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/export_enhance.js b/plugin/export_enhance.js index dd0652ac..7f5e6c9d 100644 --- a/plugin/export_enhance.js +++ b/plugin/export_enhance.js @@ -1,5 +1,5 @@ class exportEnhancePlugin extends BasePlugin { - beforeProcess = async () => new Promise(resolve => { + beforeProcess = () => new Promise(resolve => { const until = () => this.utils.exportHelper.isAsync !== undefined; const after = () => resolve(this.utils.exportHelper.isAsync ? undefined : this.utils.stopLoadPluginError); this.utils.loopDetector(until, after) diff --git a/plugin/markmap/index.js b/plugin/markmap/index.js index bbac24ba..ae8e0639 100644 --- a/plugin/markmap/index.js +++ b/plugin/markmap/index.js @@ -56,7 +56,7 @@ class markmapPlugin extends BasePlugin { onButtonClick = () => this.tocMarkmap && this.tocMarkmap.callback() assignOptions = (update, old) => { - const update_ = this.utils.fromObject(update, ["spacingHorizontal", "spacingVertical", "fitRatio", "paddingX"]); + const update_ = this.utils.fromObject(update, ["spacingHorizontal", "spacingVertical", "fitRatio", "paddingX", "autoFit"]); const options = this.MarkmapLib.deriveOptions({ ...old, ...update }); return Object.assign(options, update_) } @@ -570,7 +570,7 @@ class tocMarkmap { { label: "节点垂直间距", type: "range", min: 1, max: 50, step: 1, inline: true, ...KV("spacingVertical") }, { label: "节点内部边距", type: "range", min: 1, max: 50, step: 1, inline: true, ...KV("paddingX") }, { label: "节点最大长度", type: "range", min: 0, max: 1000, step: 10, inline: true, info: INFO.MAX_WIDTH, ...KV("maxWidth") }, - { label: "图形的窗口填充率", type: "range", min: 0.5, max: 1, step: 0.01, inline: true, ...KV("fitRatio") }, + { label: "窗口填充率", type: "range", min: 0.5, max: 1, step: 0.01, inline: true, ...KV("fitRatio") }, { label: "动画持续时间", type: "range", min: 100, max: 1000, step: 100, inline: true, ...KV("duration") }, { label: "定位的视口高度", type: "range", value: _localeRatio, min: 0.1, max: 1, step: 0.01, inline: true, info: INFO.LOCALE, callback: setWrapCfg("LOCALE_HEIGHT_RATIO") } ]