feat(graph-ui): animate bounded graph layout

This commit is contained in:
youzini
2026-06-04 13:44:12 +00:00
parent 865b878cd3
commit 7756043b97
3 changed files with 567 additions and 71 deletions

View File

@@ -5,6 +5,9 @@ const DEFAULT_NATIVE_RUNTIME_OPTIONS = Object.freeze({
graphNativeLayoutWorkerTimeoutMs: 260,
nativeEngineFailOpen: true,
graphNativeForceDisable: false,
graphAnimatedLayout: true,
graphLayoutAnimation: true,
graphLayoutAnimationEnabled: true,
});
function clampPositiveInt(value, fallback, { min = 1, max = 120000 } = {}) {
@@ -57,6 +60,18 @@ export function normalizeGraphNativeRuntimeOptions(options = {}) {
source.graphNativeForceDisable,
DEFAULT_NATIVE_RUNTIME_OPTIONS.graphNativeForceDisable,
),
graphAnimatedLayout: normalizeBoolean(
source.graphAnimatedLayout,
DEFAULT_NATIVE_RUNTIME_OPTIONS.graphAnimatedLayout,
),
graphLayoutAnimation: normalizeBoolean(
source.graphLayoutAnimation,
DEFAULT_NATIVE_RUNTIME_OPTIONS.graphLayoutAnimation,
),
graphLayoutAnimationEnabled: normalizeBoolean(
source.graphLayoutAnimationEnabled,
DEFAULT_NATIVE_RUNTIME_OPTIONS.graphLayoutAnimationEnabled,
),
};
}