Place new Full cast members independently when the connected view is empty
This commit is contained in:
parent
7c705dd258
commit
dc65c9b258
@ -192,6 +192,25 @@ const { chromium } = require("playwright"),
|
||||
);
|
||||
await p.locator("#rwEmptyFull").click();
|
||||
await ready();
|
||||
assert(
|
||||
await p.evaluate(() => {
|
||||
const nodes = PlotDirectorRelationshipWorkspace.cy.nodes(":visible"),
|
||||
bs = nodes.map((n) => n.boundingBox({ includeOverlays: false }));
|
||||
return (
|
||||
nodes.length === 20 &&
|
||||
bs.every((a, i) =>
|
||||
bs
|
||||
.slice(i + 1)
|
||||
.every(
|
||||
(b) =>
|
||||
Math.min(a.x2, b.x2) <= Math.max(a.x1, b.x1) ||
|
||||
Math.min(a.y2, b.y2) <= Math.max(a.y1, b.y1),
|
||||
),
|
||||
)
|
||||
);
|
||||
}),
|
||||
"Full cast from an empty view places each new member separately before any automatic arrangement",
|
||||
);
|
||||
await p.locator('.rw-menu[data-pwa-context="Layout"] > summary').click();
|
||||
await p.locator("#rwLayout").selectOption("radial");
|
||||
await p.locator("#rwCentreDialog[open]").waitFor();
|
||||
|
||||
@ -323,8 +323,14 @@
|
||||
}
|
||||
function freePosition(id, preferred) {
|
||||
const c = castById.get(id),
|
||||
other = visible()
|
||||
.filter((n) => n.data("characterID") !== id)
|
||||
other = cy
|
||||
.nodes()
|
||||
.filter(
|
||||
(n) =>
|
||||
n.data("characterID") !== id &&
|
||||
members.has(n.data("characterID")) &&
|
||||
positions.has(n.data("characterID")),
|
||||
)
|
||||
.map((n) => ({
|
||||
id: n.data("characterID"),
|
||||
w: n.outerWidth(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user