Skip to content

Commit

Permalink
Removing supportHiddenMaterial option, see #256
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinVallejo committed Jul 22, 2024
1 parent 4a01214 commit 5168e56
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 15 deletions.
1 change: 0 additions & 1 deletion js/buoyancy-basics/view/BuoyancyBasicsExploreScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export default class BuoyancyBasicsExploreScreenView extends BuoyancyScreenView<
tandem: tandem,
minCustomMass: 0.1,
maxCustomMass: 15,
supportHiddenMaterial: true,
mysteryMaterials: []
}
);
Expand Down
1 change: 0 additions & 1 deletion js/buoyancy/view/BuoyancyExploreScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export default class BuoyancyExploreScreenView extends BuoyancyScreenView<Buoyan
{
tandem: tandem,
minCustomMass: 0.1,
supportHiddenMaterial: true,
mysteryMaterials: [ Material.MATERIAL_X, Material.MATERIAL_Y ]
}
);
Expand Down
1 change: 0 additions & 1 deletion js/buoyancy/view/BuoyancyLabScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ export default class BuoyancyLabScreenView extends BuoyancyScreenView<BuoyancyLa
{
tandem: tandem.createTandem( 'blockPanel' ),
minCustomMass: 0.1,
supportHiddenMaterial: true,
maxVolumeLiters: maxBlockVolume,
mysteryMaterials: [ Material.MATERIAL_O, Material.MATERIAL_P ]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ export default class BuoyancyApplicationsScreenView extends BuoyancyScreenView<B
maxVolumeLiters: model.bottle.materialInsideVolumeRange.max,
minCustomVolumeLiters: 0.5,
showMassAsReadout: true,
supportHiddenMaterial: true,
customKeepsConstantDensity: true,
tandem: materialInsideControlsTandem,

Expand Down Expand Up @@ -229,8 +228,7 @@ export default class BuoyancyApplicationsScreenView extends BuoyancyScreenView<B
Material.MATERIAL_W
] ), cubicMeters => model.block.updateSize( Cube.boundsFromVolume( cubicMeters ) ), this.popupLayer, true, {
tandem: tandem.createTandem( 'blockControls' ),
highDensityMaxMass: 215,
supportHiddenMaterial: true
highDensityMaxMass: 215
} );

model.block.materialProperty.link( material => {
Expand Down
9 changes: 0 additions & 9 deletions js/common/view/MaterialControlNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ type SelfMaterialControlNodeOptions = {
// A label, if provided to be placed to the right of the ComboBox
labelNode?: Node | null;

// If a hidden material (Mystery materials for example) should be added to the ComboBox
// TODO AV: why can't this just be derived from if you pass in mystery material in the parameter? https://github.com/phetsims/density-buoyancy-common/issues/256
supportHiddenMaterial?: boolean;

minCustomMass?: number;
maxCustomMass?: number;
minCustomVolumeLiters?: number;
Expand All @@ -51,7 +47,6 @@ export default class MaterialControlNode extends VBox {
const options = optionize<MaterialControlNodeOptions, SelfMaterialControlNodeOptions, VBoxOptions>()( {
syncCustomMaterialDensity: true,
labelNode: null,
supportHiddenMaterial: false,
minCustomMass: 0.5,
maxCustomMass: 10,
minCustomVolumeLiters: 1,
Expand All @@ -63,10 +58,6 @@ export default class MaterialControlNode extends VBox {
align: 'left'
} );

if ( !options.supportHiddenMaterial ) {
materials = materials.filter( material => !material.hidden );
}

const comboMaxWidth = 110;

// TODO AV: sort at usage sites instead? https://github.com/phetsims/density-buoyancy-common/issues/256
Expand Down

1 comment on commit 5168e56

@AgustinVallejo
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.