no message

This commit is contained in:
KuroSago 2025-05-12 16:54:39 +08:00
parent 6d3bf694c1
commit 31a589e863

View File

@ -108,10 +108,7 @@ function drawMiniMap() {
}
}
function toggle_mini_map(show) {
showMiniMap.value = show; // store
// nextTick watch
}
watch(
() => showMiniMap.value,
@ -127,10 +124,7 @@ watch(
);
function data_change() {
if (!showMiniMap.value) {
// 使 store
return;
}
if (!showMiniMap.value) return;
clearTimeout(timer.value);
timer.value = setTimeout(() => {
drawMiniMap();
@ -173,9 +167,7 @@ function onMousemove(e) {
}
function onMouseup(e) {
if (!withTransition.value) {
withTransition.value = true;
}
if (!withTransition.value) withTransition.value = true;
const currentMindMap = getMindMapInstance();
if (
currentMindMap &&
@ -205,6 +197,7 @@ function onViewBoxMousemove(e) {
typeof currentMindMap.miniMap.onViewBoxMousemove === "function"
) {
currentMindMap.miniMap.onViewBoxMousemove(e);
console.log("onViewBoxMousemove");
}
}
@ -220,36 +213,12 @@ onMounted(() => {
setSize();
window.addEventListener("resize", setSize);
window.addEventListener("mouseup", onMouseup);
// 线 ()
// eventBus.on('toggle_mini_map', toggle_mini_map);
// eventBus.on('data_change', data_change);
// eventBus.on('view_data_change', data_change); // Vue2 view_data_change data_change
// eventBus.on('node_tree_render_end', data_change);
// watch(getMindMapInstance(), (newInstance) => {
// if (newInstance && typeof newInstance.on === 'function') {
// newInstance.on(
// 'mini_map_view_box_position_change',
// onViewBoxPositionChange
// );
// }
// }, { immediate: true });
// toggle_mini_map(true)
//
});
onUnmounted(() => {
window.removeEventListener("resize", setSize);
window.removeEventListener("mouseup", onMouseup);
// 线 ()
// eventBus.off('toggle_mini_map', toggle_mini_map);
// eventBus.off('data_change', data_change);
// eventBus.off('view_data_change', data_change);
// eventBus.off('node_tree_render_end', data_change);
const currentMindMap = getMindMapInstance();
if (currentMindMap && typeof currentMindMap.off === "function") {
currentMindMap.off(