Skip to content

Commit a298323

Browse files
committed
[layout] quality metric bug
metric was always calculated whatever the settings relates #173
1 parent e4c23d3 commit a298323

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/layouts/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ export const layoutActions = {
114114
const gridEnabledAtom = derivedAtom(layoutStateAtom, (value) => pick(value.quality, "enabled"), {
115115
checkOutput: true,
116116
});
117-
gridEnabledAtom.bindEffect((enabled) => {
118-
if (!enabled) return;
117+
gridEnabledAtom.bindEffect((connectedClosenessSettings) => {
118+
if (!connectedClosenessSettings.enabled) return;
119119

120120
// Compute the layout quality metric when node's position changed
121121
const { computeLayoutQualityMetric } = layoutActions;

0 commit comments

Comments
 (0)