Browse Source

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

Xiaogang Liao 3 tháng trước cách đây
mục cha
commit
4d048f5a64
1 tập tin đã thay đổi với 2 bổ sung và 2 xóa
  1. 2 2
      cfc-frontend/components/FamilyRelationGraph.vue

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

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