-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Related to #258 PhET-iO instrumentation...
Vectors (model elements) are instantiated and instrumented at startup in order to meet the needs of PhET-iO. This was a big expensive change that was done in #258.
VectorNodes (view elements) are not instantiated at startup and not instrumented. They are instantiated and disposed dynamically as the vectors exit/enter the toolbox. This means that it's not currently possible to customize input listeners for dragging, hotkeys, etc.
Options:
-
Instantiate all VectorNode (view) instances at startup, the same way that we do Vector (model) instances. Then the PhET-iO client can customize input listeners on a per-
VectorNode(view) basis. This will be expensive, probably 20-25 hours. -
Add Properties for customization of input listeners to each Vector instance in the model. Then the PhET-iO client can customize input listeners on a per-
Vector(model) basis. This will be less expensive, probably 5-10 hours. -
Add global Properties for customizing input listeners. These Properties would apply to all vector instances, so we loose the per-vector customization. For example, it would not be possible to allow dragging of vector 'a', but turn off dragging of vectors 'b' and 'c'. This is the least expensive options, probably 3-5 hours.
-
Do nothing for the 1.1 release. This will meet requirements for PhET Studio v1, but not PhET Studio v2 or PhET-iO Studio. This is the no-cost option.
Each of these options is quite different -- different implementation, and different PhET-iO API. With the exception of (4), switching to a different option in the future would be difficult/expensive, and would not have a clear PhET-iO migration path.
If (4) is not an options, then I'm leaning towards option (2).
@matthew-blackman thoughts?