Rebuild Displays around the canvas, and let the transaction keep color
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
@@ -75,6 +75,36 @@ ShellRoot {
|
||||
})));
|
||||
}
|
||||
|
||||
// One display is the common case on a laptop, and the canvas is the
|
||||
// page's hero now: it renders that display rather than disappearing and
|
||||
// leaving a picker for a list of one. Only dragging goes away, because
|
||||
// there is nothing to arrange it against.
|
||||
function soloFixture(): string {
|
||||
const previous = fixtureService.monitors;
|
||||
fixtureService.monitors = [previous[0]];
|
||||
arrangement.resetDraft();
|
||||
const snapshot = arrangement.canvasSnapshot();
|
||||
fixtureService.monitors = previous;
|
||||
arrangement.resetDraft();
|
||||
return JSON.stringify(snapshot);
|
||||
}
|
||||
|
||||
// A mirrored display has no position of its own -- the compositor puts
|
||||
// it on top of its target -- so the canvas stacks it there and says so
|
||||
// rather than drawing it wherever its stale coordinates point.
|
||||
function mirrorFixture(): string {
|
||||
const previous = fixtureService.monitors;
|
||||
fixtureService.monitors = [
|
||||
previous[0],
|
||||
Object.assign({}, previous[1], { mirrorOf: "DP-2" })
|
||||
];
|
||||
arrangement.resetDraft();
|
||||
const snapshot = arrangement.canvasSnapshot();
|
||||
fixtureService.monitors = previous;
|
||||
arrangement.resetDraft();
|
||||
return JSON.stringify(snapshot);
|
||||
}
|
||||
|
||||
function identify(): void { Displays.identify(); }
|
||||
function identifying(): bool { return Displays.identifying; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user