Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/bus-solver/TinyHyperGraphBusSolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,12 @@ export class TinyHyperGraphBusSolver extends TinyHyperGraphSolver {
regionCache.lesserAngles = EMPTY_PREVIEW_INT32_ARRAY
regionCache.greaterAngles = EMPTY_PREVIEW_INT32_ARRAY
regionCache.layerMasks = EMPTY_PREVIEW_INT32_ARRAY
regionCache.port1Ids = EMPTY_PREVIEW_INT32_ARRAY
regionCache.port2Ids = EMPTY_PREVIEW_INT32_ARRAY
regionCache.x1 = new Float64Array(0)
regionCache.y1 = new Float64Array(0)
regionCache.x2 = new Float64Array(0)
regionCache.y2 = new Float64Array(0)
regionCache.existingCrossingLayerIntersections = 0
regionCache.existingSameLayerIntersections = 0
regionCache.existingEntryExitLayerChanges = 0
Expand Down
12 changes: 12 additions & 0 deletions lib/bus-solver/previewRoutingState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ export const snapshotPreviewRoutingState = (
lesserAngles: new Int32Array(cache.lesserAngles),
greaterAngles: new Int32Array(cache.greaterAngles),
layerMasks: new Int32Array(cache.layerMasks),
port1Ids: new Int32Array(cache.port1Ids ?? new Int32Array(0)),
port2Ids: new Int32Array(cache.port2Ids ?? new Int32Array(0)),
x1: new Float64Array(cache.x1 ?? new Float64Array(0)),
y1: new Float64Array(cache.y1 ?? new Float64Array(0)),
x2: new Float64Array(cache.x2 ?? new Float64Array(0)),
y2: new Float64Array(cache.y2 ?? new Float64Array(0)),
existingCrossingLayerIntersections:
cache.existingCrossingLayerIntersections,
existingSameLayerIntersections: cache.existingSameLayerIntersections,
Expand All @@ -81,6 +87,12 @@ export const restorePreviewRoutingState = (
lesserAngles: new Int32Array(cache.lesserAngles),
greaterAngles: new Int32Array(cache.greaterAngles),
layerMasks: new Int32Array(cache.layerMasks),
port1Ids: new Int32Array(cache.port1Ids ?? new Int32Array(0)),
port2Ids: new Int32Array(cache.port2Ids ?? new Int32Array(0)),
x1: new Float64Array(cache.x1 ?? new Float64Array(0)),
y1: new Float64Array(cache.y1 ?? new Float64Array(0)),
x2: new Float64Array(cache.x2 ?? new Float64Array(0)),
y2: new Float64Array(cache.y2 ?? new Float64Array(0)),
existingCrossingLayerIntersections:
cache.existingCrossingLayerIntersections,
existingSameLayerIntersections: cache.existingSameLayerIntersections,
Expand Down
Loading
Loading