mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-02 21:01:21 +00:00
refactor(iso): drop the unused stageSize from the overlay fit input (#741)
Since #713 the overlay fit envelope reserves no nudge budget, and since #725 _isoScene passes `stageSize: null` while resolveIsoOverlayFitEnvelope never reads the field. The room focus still built a { width, height } object from the stage for nothing. The optional field is removed from IsoOverlayFitEnvelopeInput together with both call-site arguments. The #725 AC3 unit compared bounds with stageSize null and 1000x500, which is now meaningless; it checks instead that the fit bounds follow only scene.frame and the tiles: the same bounds for every stage aspect, a moved frame moves them, an enclosing frame is returned as is. Issue: #741 User-Visible: no Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd
This commit is contained in:
@@ -6004,7 +6004,7 @@ export class HouseplanCard extends LitElement {
|
||||
disp, runtime.resolveIsoDecorationLayers(disp), scene, iconPct, effectiveDeviceBaseSize(iconPct),
|
||||
disp.showLqi ?? this._config?.show_signal ?? true);
|
||||
const envelope = overlays && runtime.resolveIsoOverlayFitEnvelope({
|
||||
baseBounds: scene.frame, entries: overlays.entries, stageSize: null, targetView: (bounds) =>
|
||||
baseBounds: scene.frame, entries: overlays.entries, targetView: (bounds) =>
|
||||
fitView([bounds.x, bounds.y, bounds.w, bounds.h], aspect) });
|
||||
return envelope ? { ...scene, frame: envelope.bounds, overlayFitEntries: overlays.entries } : scene;
|
||||
}
|
||||
@@ -6192,8 +6192,7 @@ export class HouseplanCard extends LitElement {
|
||||
const runtime = this._isoSceneRuntime, entries = this._renderIsoScene?.overlayFitEntries;
|
||||
if (target && this._effectiveProjection() === 'iso' && runtime && entries?.length) {
|
||||
const envelope = runtime.resolveIsoOverlayFitEnvelope({
|
||||
baseBounds: bounds, entries, ownerId: room.id, stageSize: {
|
||||
width: stage.clientWidth, height: stage.clientHeight },
|
||||
baseBounds: bounds, entries, ownerId: room.id,
|
||||
targetView: (fitBounds) => targetOf(fitBounds)?.viewBox ?? null });
|
||||
if (envelope) { bounds = envelope.bounds; target = targetOf(bounds); }
|
||||
}
|
||||
|
||||
@@ -648,7 +648,6 @@ export function isoOverlaySceneBounds(
|
||||
export interface IsoOverlayFitEnvelopeInput {
|
||||
baseBounds: Rect;
|
||||
entries: readonly IsoOverlayRenderEntry[];
|
||||
stageSize?: { width: number; height: number } | null;
|
||||
targetView(bounds: Rect): Rect | null;
|
||||
ownerId?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user