Progress.

This commit is contained in:
Henning Dieterichs
2019-08-01 20:18:36 +02:00
parent 52db41558e
commit 99a0f854a3
9 changed files with 249 additions and 53 deletions

View File

@@ -25,6 +25,7 @@ export function SampleTreeVisualizer() {
viewModel,
root.parentPropertyName,
root.name,
undefined,
children
);
for (const c of children) {

View File

@@ -36,8 +36,9 @@ export class TreeViewModel {
if (this.lastUpdateVersion === this.version) {
return;
}
this.lastUpdateVersion = this.version;
this.lastUpdateVersion = this.version;
console.log("update");
this.root.updateOffsets();
}
@@ -81,6 +82,8 @@ export class TreeViewModel {
}
}
let i = 0;
export class TreeNodeViewModel {
public parent: TreeNodeViewModel | null = null;
@@ -191,8 +194,8 @@ export class TreeWithPathView extends React.Component<{
@observer
export class TreeView extends React.Component<{ model: TreeViewModel }> {
componentWillUpdate() {
this.props.model.stop();
componentWillUpdate(newProps: this["props"]) {
newProps.model.stop();
}
componentWillMount() {