Do not add empty arrays to the frameState's declutterItems
This commit is contained in:
@@ -478,15 +478,15 @@ export function replayDeclutter(
|
|||||||
let currentExecutor;
|
let currentExecutor;
|
||||||
for (let i = 0, ii = executorData.length; i < ii; ) {
|
for (let i = 0, ii = executorData.length; i < ii; ) {
|
||||||
const executor = executorData[i++];
|
const executor = executorData[i++];
|
||||||
if (executor !== currentExecutor) {
|
const transform = executorData[i++];
|
||||||
|
executor.execute(context, 1, transform, rotation, snapToPixel);
|
||||||
|
if (executor !== currentExecutor && executor.declutterItems.length > 0) {
|
||||||
currentExecutor = executor;
|
currentExecutor = executor;
|
||||||
declutterItems.push({
|
declutterItems.push({
|
||||||
items: executor.declutterItems,
|
items: executor.declutterItems,
|
||||||
opacity: opacity,
|
opacity: opacity,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const transform = executorData[i++];
|
|
||||||
executor.execute(context, 1, transform, rotation, snapToPixel);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user