mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-06 22:49:16 +00:00
fix: make plan visuals grid-scale invariant
Issue: #239 User-Visible: yes
This commit is contained in:
@@ -41,13 +41,14 @@ test('all current floor/live layers remain in the one main scene', () => {
|
||||
test('structural cache includes opening flips and excludes live HA amount', () => {
|
||||
assert.match(card, /flipH: !!opening\.flip_h/);
|
||||
assert.match(card, /flipV: !!opening\.flip_v/);
|
||||
assert.match(card, /floorEdgeHeight: ISO_FLOOR_EDGE_HEIGHT, algorithm: 3/);
|
||||
assert.match(card, /const floorEdgeHeight = gridVisualUnits\(ISO_FLOOR_EDGE_HEIGHT, this\._cellCm\)/);
|
||||
assert.match(card, /floorEdgeHeight, algorithm: 3/);
|
||||
const source = card.slice(card.indexOf('private _isoSource()'), card.indexOf('private _isoSceneKey()'));
|
||||
assert.doesNotMatch(source, /_openingAmt|openingAmount|\.hass|matchMedia|CSS\.supports|theme|hover/);
|
||||
assert.match(card, /projectIsoOpening\(basis, this\._openingAmt\(opening\)\)/);
|
||||
assert.match(card, /isoLayers && !isoLayers\.floorSymbols/);
|
||||
assert.match(card, /if \(!this\._spaceDisplayForRender\(\)\.showBorders\)/);
|
||||
assert.match(card, /projectedFrame\(\{ rect: flat, wallHeight: ISO_WALL_HEIGHT \}\)/);
|
||||
assert.match(card, /wallHeight: gridVisualUnits\(ISO_WALL_HEIGHT, this\._cellCm\)/);
|
||||
assert.match(card, /viewBox=\$\{isoLayers\?\.structural[\s\S]*?: `\$\{floorView\.x\}/);
|
||||
assert.match(card, /preserveAspectRatio=\$\{isoLayers\?\.structural \|\| !iso \? 'xMidYMid meet' : 'none'\}/);
|
||||
assert.match(card, /transform=\$\{isoLayers\?\.structural \? isoFloorMatrixCss\(\) : nothing\}/);
|
||||
|
||||
Reference in New Issue
Block a user