Added Application.md + add more TODOs

This commit is contained in:
Eric NGUYEN 2022-10-17 15:42:53 +02:00
parent df94e7904d
commit 41dd119200
3 changed files with 185 additions and 0 deletions

View file

@ -2,6 +2,8 @@ import { IContainerProperties } from './IContainerProperties';
export interface IContainerModel {
children: string[]
// TODO: Remove parent now that accessing the parent by id is faster.
// TODO: Use GetContainerById(container.properties.parentId) as the better alternative.
parent: IContainerModel | null
properties: IContainerProperties
userData: Record<string, string | number>
@ -13,6 +15,8 @@ export interface IContainerModel {
*/
export class ContainerModel implements IContainerModel {
public children: string[];
// TODO: Remove parent now that accessing the parent by id is faster.
// TODO: Use GetContainerById(container.properties.parentId) as the better alternative.
public parent: IContainerModel | null;
public properties: IContainerProperties;
public userData: Record<string, string | number>;

View file

@ -40,6 +40,8 @@ export function ReviveState(state: IHistoryState): void {
return;
}
// TODO: remove parent and remove this bloc of code
// TODO: See IContainerModel.ts for more detail
const it = MakeDFSIterator(root, state.containers);
for (const container of it) {
const parentId = container.properties.parentId;