From 28948e96a88ccfdac31497ac451359ee81b8ab93 Mon Sep 17 00:00:00 2001 From: zepumph Date: Wed, 14 Oct 2020 10:10:54 -0800 Subject: [PATCH] update documentation and add visiblePropertyOptions to config, https://github.com/phetsims/scenery/issues/1046 --- js/nodes/Node.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/nodes/Node.js b/js/nodes/Node.js index ff8b648cd..fa838c441 100644 --- a/js/nodes/Node.js +++ b/js/nodes/Node.js @@ -5272,6 +5272,15 @@ inherit( PhetioObject, Node, { */ initializePhetioObject: function( baseOptions, config ) { + config = merge( { + + // This option is used to create the instrumented, default PhET-iO visibleProperty. These options should not + // be provided if a `visibleProperty` was provided to this Node. This option is a bit buried because it can only + // be used when the Node is being instrumented, which is when the default, instrumented visibleProperty is + // conditionally created. We don't want to store these on the Node, and thus they aren't support through `mutate()`. + visiblePropertyOptions: null + }, config ); + // Track this, so we only override our visibleProperty once. const wasInstrumented = this.isPhetioInstrumented();