Skip to content

Commit

Permalink
Add REVIEW comments, see #398
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Mar 3, 2023
1 parent ddf2852 commit 3e95ff0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/quadrilateral/model/QuadrilateralShapeModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ export default class QuadrilateralShapeModel {
this.vertices = [ this.vertexA, this.vertexB, this.vertexC, this.vertexD ];

this.oppositeVertexMap = new Map( [

// REVIEW: Should the values be arrays? It looks like they are always accessed with [0].
[ this.vertexA, [ this.vertexC ] ],
[ this.vertexB, [ this.vertexD ] ],
[ this.vertexC, [ this.vertexA ] ],
Expand Down Expand Up @@ -590,6 +592,8 @@ export default class QuadrilateralShapeModel {
private updateParallelSideProperties(): void {
const sideABSideCDParallel = this.sideABSideCDParallelSideChecker.areSidesParallel();
const sideBCSideDAParallel = this.sideBCSideDAParallelSideChecker.areSidesParallel();

// REVIEW: Can/should this use QuadrilateralShapeDetector? It already computes if we are a parallelogram
this.isParallelogramProperty.set( sideABSideCDParallel && sideBCSideDAParallel );

const previousParallelSidePairs = this.parallelSidePairsProperty.value;
Expand Down

0 comments on commit 3e95ff0

Please sign in to comment.