|
|
@@ -484,15 +484,15 @@ class KnowledgeMindmapGraph {
|
|
|
bindEvents() {
|
|
|
if (!this.graph) return;
|
|
|
|
|
|
- this.graph.on('node:mouseenter', (evt) => {
|
|
|
+ this.graph.on('node:mouseover', (evt) => {
|
|
|
const item = evt.item;
|
|
|
- if (!item || item.getModel().locked) return;
|
|
|
+ // if (!item || item.getModel().locked) return;
|
|
|
this.graph.setItemState(item, 'hover', true);
|
|
|
this.highlightNeighbors(item.getModel().id);
|
|
|
this.showTooltip(evt, item.getModel());
|
|
|
});
|
|
|
|
|
|
- this.graph.on('node:mouseleave', (evt) => {
|
|
|
+ this.graph.on('node:mouseout', (evt) => {
|
|
|
const item = evt.item;
|
|
|
if (!item) return;
|
|
|
this.graph.setItemState(item, 'hover', false);
|
|
|
@@ -691,6 +691,7 @@ class KnowledgeMindmapGraph {
|
|
|
|
|
|
const item = this.graph.findById(targetId);
|
|
|
if (item) {
|
|
|
+ this.graph.zoom(2);
|
|
|
this.graph.focusItem(item, true, {
|
|
|
easing: 'easeCubic',
|
|
|
duration: 500,
|
|
|
@@ -793,7 +794,7 @@ class KnowledgeMindmapGraph {
|
|
|
this.clickTimer = setTimeout(() => {
|
|
|
const model = evt.item?.getModel();
|
|
|
if (!model) return;
|
|
|
- if (model.locked) return;
|
|
|
+ // if (model.locked) return;
|
|
|
|
|
|
this.graph.getNodes().forEach((node) => {
|
|
|
this.graph.clearItemStates(node);
|