HASKI-RAK / HASKI-Frontend

Frontend of HASKI
Apache License 2.0
5 stars 1 forks source link

Reactflow center on first element when selection changes #304

Closed DimitriB01 closed 1 month ago

DimitriB01 commented 4 months ago

Requirements

DimitriB01 commented 2 months ago

Muss danach linten, da danach über 300 files betroffen sind wegen import sortierung

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

DimitriB01 commented 1 month ago

Unsichtbarer Button wurde nun ersetzt durch einen ReactFlowProvider (App ist wrapped) und den folgenden useEffect in der Topic page

useEffect(() => {
    if(initialNodes) {
      setTimeout(() => {
        fitView({
          padding: 5,
          minZoom: 0.75,
          duration: 100,
          nodes: [{ id: initialNodes[0].id }]
        })
      }, 100)
    }},[topicId])