mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
fix(editor): сохранять позицию кнопки при отмене Resize (#645)
Транзитная геометрия Resize теперь только вычисляет центр для текущего кадра и не удаляет сессионную позицию. Окончательная геометрия по-прежнему очищает точку, если она действительно вышла за комнату. Issue: #645 User-Visible: yes
This commit is contained in:
@@ -12012,10 +12012,22 @@ const MUTANT_DEFINITIONS = [
|
||||
+ 'rendered for the room button, not reserve the now-empty automatic centre',
|
||||
patches: [{
|
||||
file: 'src/houseplan-editor-runtime.ts',
|
||||
find: ' ? (this.roomGear.center(room, poly, space!.id) || poleOfInaccessibility(poly))',
|
||||
find: ' ? (this.roomGear.previewCenter(room, poly, space!.id) || poleOfInaccessibility(poly))',
|
||||
replace: ' ? poleOfInaccessibility(poly) // mutant: ignore the moved room button',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'room-gear-preview-prunes-session-position',
|
||||
guard: 'node --test --test-name-pattern="Resize preview cannot prune" test/room-gear-drag.test.mjs',
|
||||
because: '#645 review r1 M1: a transient Resize polygon may exclude the moved room button, '
|
||||
+ 'but cancelling that preview must preserve the session position that remains valid in the '
|
||||
+ 'committed room geometry',
|
||||
patches: [{
|
||||
file: 'src/room-gear-drag.ts',
|
||||
find: ' return resolveRoomGearCenter(\n room, this.positions.get(this.key(room.id, spaceId)), polygonOverride,\n ).point;',
|
||||
replace: ' return this.center(room, polygonOverride, spaceId); // mutant: preview prunes state',
|
||||
}],
|
||||
},
|
||||
];
|
||||
|
||||
const mutationCardSource = readFileSync(join(repoRoot, 'src/houseplan-card.ts'), 'utf8');
|
||||
|
||||
Reference in New Issue
Block a user