Closed samreid closed 1 year ago
@matthew-blackman and I determined there is an ordering problem. When 2 vertices are joined, one is disposed. If the disposal happens afterwards, the cut button disappears. Maybe this disposal line is too greedy:
CCKCUtils.setInSceneGraph( false, circuitLayerNode.buttonLayer, cutButton );
After the commit, things are working much better. But the look of the disabled cut button is a bit paler, perhaps the opacity or grayscale is applied twice?
@samreid and I found that the disabled opacity of the cut button was consistent with the DISABLED_OPACITY constant in SceneryConstants.js. We also looked into the component tree using the joist helper, and did not see any node structure that was applying opacity twice to the cut button.
Noteworthy: The unbuilt version of the sim has a lower opacity for the disabled button than the version on the PhET website.
Vertex is not always cuttable by default. If you take out 1 wire and leave it close to the toolbox, then take out a 2nd wire further to the right, then connect them, there is no scissors for that vertex. If you reverse the order, everything is OK though. Awkward!