The way that the dependencies array is set up is feels kind of dangerous, and is not at all obvious. valueProperties is defined far away, I have to do looking for it. The number of dependenceis does not obviously equal the number of parameters in the observer. And it assumes that valueProperties will forever contain only 2 NumberProperties, something that could break.
For code review #35.
In DistanceStatementNode.js:
The way that the dependencies array is set up is feels kind of dangerous, and is not at all obvious.
valueProperties
is defined far away, I have to do looking for it. The number of dependenceis does not obviously equal the number of parameters in the observer. And it assumes thatvalueProperties
will forever contain only 2 NumberProperties, something that could break.This is more robust and more obvious: