Explorar el Código

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

Xiaogang Liao hace 3 meses
padre
commit
4d048f5a64
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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