浏览代码

fix: FamilyRelationGraph 组件兼容性修复 - 修正小程序requestAnimationFrame错误

Xiaogang Liao 3 月之前
父节点
当前提交
4d048f5a64
共有 1 个文件被更改,包括 2 次插入 和 2 次删除
  1. 2 2
      cfc-frontend/components/FamilyRelationGraph.vue

+ 2 - 2
cfc-frontend/components/FamilyRelationGraph.vue

@@ -268,7 +268,7 @@ export default {
     stopSimulation: function() {
     stopSimulation: function() {
       this.isSimulating = false
       this.isSimulating = false
       if (this.animFrameId) {
       if (this.animFrameId) {
-        cancelAnimationFrame(this.animFrameId)
+        clearTimeout(this.animFrameId)
         this.animFrameId = null
         this.animFrameId = null
       }
       }
     },
     },
@@ -277,7 +277,7 @@ export default {
       if (!this.isSimulating) return
       if (!this.isSimulating) return
 
 
       var self = this
       var self = this
-      var nodes = this.nodeData
+      var nodes = this.simNodes
       var edges = this.edges
       var edges = this.edges
       var p = this.physics
       var p = this.physics