lib/diagram/force-simulation/position-cache.js
/**
   * Load position data to nodes.
   * @param {NetworkPositionCache} cachedNetworkData - Cache for a network.
   * @param {ForceSimulationNetworkData} networkData - Network data to load.
   * @param {ForceSimulationDiagramOperator} diagramOperator - Visualizer.
   * @private
   */
Load position data to nodes.
@param {NetworkPositionCache} cachedNetworkData - Cache for a network.
@param {ForceSimulationNetworkData} networkData - Network data to load.
@param {ForceSimulationDiagramOperator} diagramOperator - Visualizer.
@private
Load position data to nodes . @param { NetworkPositionCache } cachedNetworkData - Cache for a network . @param { ForceSimulationNetworkData } networkData - Network data to load . @param { ForceSimulationDiagramOperator } diagramOperator - Visualizer . @private
_loadToNodeData(cachedNetworkData, networkData, diagramOperator) {
    for (const cachedNode of cachedNetworkData.nodes) {
      const nodeData = networkData.nodes.find((n) => n.id === cachedNode.id)
      if (nodeData) {
        nodeData.fx = cachedNode.fx
        nodeData.fy = cachedNode.fy
        diagramOperator.markNodeWith(nodeData, ['fixed', true])
      }
    }
  }
_loadToNodeData ( cachedNetworkData , networkData , diagramOperator ) { for ( const cachedNode of cachedNetworkData . nodes ) { const nodeData = networkData . nodes . find ( ( n ) => n . id === cachedNode . id ) if ( nodeData ) { nodeData . fx = cachedNode . fx nodeData . fy = cachedNode . fy diagramOperator . markNodeWith ( nodeData , [ 'fixed' , true ] ) } } }
Load position data to nodes.
Load position data to nodes .