Skip to content

Commit

Permalink
adjusting default options in ZoomButtonGroup hierarchy, #653
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Dec 17, 2020
1 parent 7e7e5bd commit 239c814
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 5 additions & 1 deletion js/MagnifyingGlassZoomButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Dimension2 from '../../dot/js/Dimension2.js';
import merge from '../../phet-core/js/merge.js';
import MagnifyingGlassNode from './MagnifyingGlassNode.js';
import MinusNode from './MinusNode.js';
import PhetColorScheme from './PhetColorScheme.js';
import PlusNode from './PlusNode.js';
import sceneryPhet from './sceneryPhet.js';
import ZoomButtonGroup from './ZoomButtonGroup.js';
Expand All @@ -21,8 +22,11 @@ class MagnifyingGlassZoomButtonGroup extends ZoomButtonGroup {
constructor( zoomLevelProperty, options ) {

options = merge( {
buttonOptions: {
baseColor: PhetColorScheme.BUTTON_YELLOW // like ZoomButton
},
magnifyingGlassNodeOptions: {
glassRadius: 10
glassRadius: 15 // like ZoomButton
}
}, options );

Expand Down
5 changes: 4 additions & 1 deletion js/PlusMinusZoomButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Dimension2 from '../../dot/js/Dimension2.js';
import merge from '../../phet-core/js/merge.js';
import AlignBox from '../../scenery/js/nodes/AlignBox.js';
import AlignGroup from '../../scenery/js/nodes/AlignGroup.js';
import ButtonNode from '../../sun/js/buttons/ButtonNode.js';
import MinusNode from './MinusNode.js';
import PlusNode from './PlusNode.js';
import sceneryPhet from './sceneryPhet.js';
Expand All @@ -27,7 +28,9 @@ class PlusMinusZoomButtonGroup extends ZoomButtonGroup {
options = merge( {
buttonOptions: {
xMargin: 9,
yMargin: 10
yMargin: 10,
cornerRadius: 0,
buttonAppearanceStrategy: ButtonNode.FlatAppearanceStrategy
},
iconOptions: {
size: DEFAULT_ICON_SIZE
Expand Down
5 changes: 0 additions & 5 deletions js/ZoomButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import NumberProperty from '../../axon/js/NumberProperty.js';
import merge from '../../phet-core/js/merge.js';
import LayoutBox from '../../scenery/js/nodes/LayoutBox.js';
import Node from '../../scenery/js/nodes/Node.js';
import ButtonNode from '../../sun/js/buttons/ButtonNode.js';
import RectangularPushButton from '../../sun/js/buttons/RectangularPushButton.js';
import Tandem from '../../tandem/js/Tandem.js';
import sceneryPhet from './sceneryPhet.js';
Expand Down Expand Up @@ -45,10 +44,6 @@ class ZoomButtonGroup extends LayoutBox {
// RectangularPushButton options
buttonOptions: {
baseColor: 'white',
buttonAppearanceStrategy: ButtonNode.FlatAppearanceStrategy,
cornerRadius: 0,
xMargin: 8,
yMargin: 5,
fireOnHold: true,
fireOnHoldDelay: 600, // ms
fireOnHoldInterval: 250 // ms
Expand Down

0 comments on commit 239c814

Please sign in to comment.