[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
|
// Cleanup
|
||||||
Object.values(document.pageStates).forEach((pageState) => {
|
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
|
return document.pages[pageState.id].shapes[id] !== undefined
|
||||||
})
|
})
|
||||||
pageState.bindingId = undefined
|
pageState.bindingId = undefined
|
||||||
pageState.editingShapeId = undefined
|
pageState.editingId = undefined
|
||||||
pageState.hoveredShapeId = undefined
|
pageState.hoveredId = undefined
|
||||||
pageState.pointedId = undefined
|
pageState.pointedId = undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1027,15 +1027,15 @@ interface TLV1Bounds {
|
||||||
|
|
||||||
interface TLV1PageState {
|
interface TLV1PageState {
|
||||||
id: string
|
id: string
|
||||||
selectedShapeIds: string[]
|
selectedIds: string[]
|
||||||
camera: {
|
camera: {
|
||||||
point: number[]
|
point: number[]
|
||||||
zoom: number
|
zoom: number
|
||||||
}
|
}
|
||||||
brush?: TLV1Bounds | null
|
brush?: TLV1Bounds | null
|
||||||
pointedId?: string | null
|
pointedId?: string | null
|
||||||
hoveredShapeId?: string | null
|
hoveredId?: string | null
|
||||||
editingShapeId?: string | null
|
editingId?: string | null
|
||||||
bindingId?: string | null
|
bindingId?: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue