[fix] revert legacy changes to buildFromV1Document.ts (#1761)
This PR fixes some GREP-introduced errors to the old structure of legacy v1 documents. ### Change Type - [x] `patch` — Bug fix ### Test Plan 1. Open a V1 document.
This commit is contained in:
parent
d750da8f40
commit
fd002d1797
1 changed files with 6 additions and 6 deletions
|
@ -780,12 +780,12 @@ function migrate(document: LegacyTldrawDocument, newVersion: number): LegacyTldr
|
|||
|
||||
// Cleanup
|
||||
Object.values(document.pageStates).forEach((pageState) => {
|
||||
pageState.selectedShapeIds = pageState.selectedShapeIds.filter((id) => {
|
||||
pageState.selectedIds = pageState.selectedIds.filter((id) => {
|
||||
return document.pages[pageState.id].shapes[id] !== undefined
|
||||
})
|
||||
pageState.bindingId = undefined
|
||||
pageState.editingShapeId = undefined
|
||||
pageState.hoveredShapeId = undefined
|
||||
pageState.editingId = undefined
|
||||
pageState.hoveredId = undefined
|
||||
pageState.pointedId = undefined
|
||||
})
|
||||
|
||||
|
@ -1027,15 +1027,15 @@ interface TLV1Bounds {
|
|||
|
||||
interface TLV1PageState {
|
||||
id: string
|
||||
selectedShapeIds: string[]
|
||||
selectedIds: string[]
|
||||
camera: {
|
||||
point: number[]
|
||||
zoom: number
|
||||
}
|
||||
brush?: TLV1Bounds | null
|
||||
pointedId?: string | null
|
||||
hoveredShapeId?: string | null
|
||||
editingShapeId?: string | null
|
||||
hoveredId?: string | null
|
||||
editingId?: string | null
|
||||
bindingId?: string | null
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue