-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unused term maxVoltagePercent in multilink #107
Comments
Yes indeed, the value of maxVoltagePercentProperty is unused, but it is indeed a dependency. If either maxVoltagePercentProperty or angleRangeProperty is changed, then angleProperty needs to be set to the min angle. And I'd rather have unused callback params than a partial list of callback params. (Recall that including unused params in callbacks is up to developer discretion.) Back to @samreid, close if OK. |
To clarify... What I've tried to do consistently (there are probably exceptions) for Multilink and DerivedProperty callbacks is:
For example: // FELScreenView.ts, panelsBounds is not used.
Multilink.multilink( [ this.visibleBoundsProperty, options.panels.boundsProperty ],
( visibleBounds, panelsBounds ) => {
options.panels.right = visibleBounds.right - FELConstants.SCREEN_VIEW_X_MARGIN;
options.panels.top = this.layoutBounds.top + FELConstants.SCREEN_VIEW_Y_MARGIN;
} ); // FieldNode.ts
Multilink.multilink(
[ magnet.positionProperty, magnet.rotationProperty, magnet.strengthProperty, magnet.fieldScaleProperty ],
() => this.update()
); |
Great! I documented it as you described, and the policy for the multilink and derived property sounds good. Closing. |
Discovered in code review #103, ACPowerSupply says:
The
maxVoltagePercent
appears unused.The text was updated successfully, but these errors were encountered: