mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🎨 resize
This commit is contained in:
parent
de68e10ec9
commit
ec6ced8408
4 changed files with 17 additions and 9 deletions
|
|
@ -3,12 +3,11 @@ import {setPadding} from "../ui/initUI";
|
|||
import {hasClosestBlock} from "./hasClosest";
|
||||
import {Constants} from "../../constants";
|
||||
|
||||
let resizeTimeout: number;
|
||||
export const resize = (protyle: IProtyle) => {
|
||||
hideElements(["gutter"], protyle);
|
||||
setPadding(protyle);
|
||||
clearTimeout(resizeTimeout);
|
||||
resizeTimeout = window.setTimeout(() => {
|
||||
// 不能 clearTimeout,否则 split 时左侧无法 resize
|
||||
window.setTimeout(() => {
|
||||
if (typeof echarts !== "undefined") {
|
||||
protyle.wysiwyg.element.querySelectorAll('[data-subtype="echarts"], [data-subtype="mindmap"]').forEach((chartItem: HTMLElement) => {
|
||||
const chartInstance = echarts.getInstanceById(chartItem.firstElementChild.nextElementSibling.getAttribute("_echarts_instance_"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue