Skip to content

Commit

Permalink
Move updateOrderDependentProperties into QuadrilateralShapeModel and …
Browse files Browse the repository at this point in the history
…add documentation, see #398
  • Loading branch information
samreid committed Mar 2, 2023
1 parent 1231d67 commit a530d4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 1 addition & 5 deletions js/quadrilateral/model/QuadrilateralModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export default class QuadrilateralModel implements TModel {
this.quadrilateralTestShapeModel.setPropertiesDeferred( false );

// REVIEW: Make isQuadrilateralShapeAllowed static
// REVIEW: After potentially addressing the above, maybe make this method and isVertexPositionAllowed feel more similar???
return this.quadrilateralTestShapeModel.isQuadrilateralShapeAllowed();
}

Expand All @@ -185,11 +186,6 @@ export default class QuadrilateralModel implements TModel {
this.quadrilateralShapeModel.reset();
this.quadrilateralTestShapeModel.reset();

// Eagerly update the Properties that are set asynchronously, so we don't wait until
// the next frame for these to be set after a reset.
this.quadrilateralShapeModel.updateOrderDependentProperties();
this.quadrilateralTestShapeModel.updateOrderDependentProperties();

this.resetEmitter.emit();

// reset is not in progress anymore
Expand Down
2 changes: 2 additions & 0 deletions js/quadrilateral/model/QuadrilateralShapeModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@ export default class QuadrilateralShapeModel {

// no longer deferred, invoke callbacks and update order dependent Properties
this.setPropertiesDeferred( false );

this.updateOrderDependentProperties();
}

/**
Expand Down

0 comments on commit a530d4c

Please sign in to comment.