@andespindola/brainlink 0.1.0-beta.135 → 0.1.0-beta.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,7 +30,7 @@ const worldCoordinateLimit = 5_000_000
|
|
|
30
30
|
const transformCoordinateLimit = 20_000_000
|
|
31
31
|
const hoverHitTestIntervalMs = 64
|
|
32
32
|
const zoomRecoveryGuardMs = 4200
|
|
33
|
-
const
|
|
33
|
+
const hierarchyAbsoluteEdgeSafetyCap = 24_000
|
|
34
34
|
const dragNeighborhoodMaxAffected = 180
|
|
35
35
|
const dragSettleRounds = 3
|
|
36
36
|
const wheelZoomExponent = 0.0009
|
|
@@ -1542,7 +1542,7 @@ const hierarchyViewportProgress = (group, _viewport) => {
|
|
|
1542
1542
|
return Math.pow(Math.max(0, Math.min(1, transitionScaleProgress)), 2.8)
|
|
1543
1543
|
}
|
|
1544
1544
|
|
|
1545
|
-
const groupEdgesForRenderedGroups = (groupNodes) => {
|
|
1545
|
+
const groupEdgesForRenderedGroups = (groupNodes, options = { preferComplete: false }) => {
|
|
1546
1546
|
if (groupNodes.length <= 1) {
|
|
1547
1547
|
return []
|
|
1548
1548
|
}
|
|
@@ -1586,9 +1586,12 @@ const groupEdgesForRenderedGroups = (groupNodes) => {
|
|
|
1586
1586
|
})
|
|
1587
1587
|
}
|
|
1588
1588
|
|
|
1589
|
-
|
|
1589
|
+
const sorted = Array.from(selected.values())
|
|
1590
1590
|
.sort((left, right) => edgeWeight(right) - edgeWeight(left) || left.source.localeCompare(right.source) || left.target.localeCompare(right.target))
|
|
1591
|
-
|
|
1591
|
+
if (options.preferComplete) {
|
|
1592
|
+
return sorted.slice(0, Math.min(sorted.length, hierarchyAbsoluteEdgeSafetyCap))
|
|
1593
|
+
}
|
|
1594
|
+
return sorted.slice(0, Math.min(edgeBudgetForCurrentFrame(), hierarchyAbsoluteEdgeSafetyCap))
|
|
1592
1595
|
}
|
|
1593
1596
|
|
|
1594
1597
|
const computeHierarchyRenderVisibility = (viewport) => {
|
|
@@ -1610,7 +1613,7 @@ const computeHierarchyRenderVisibility = (viewport) => {
|
|
|
1610
1613
|
state.hierarchyRevealFocusGroupId = null
|
|
1611
1614
|
state.hierarchyRevealBudget = 1
|
|
1612
1615
|
state.renderNodes = groupNodes
|
|
1613
|
-
state.renderEdges = groupEdgesForRenderedGroups(groupNodes)
|
|
1616
|
+
state.renderEdges = groupEdgesForRenderedGroups(groupNodes, { preferComplete: true })
|
|
1614
1617
|
return true
|
|
1615
1618
|
}
|
|
1616
1619
|
|
package/package.json
CHANGED