Skip to content

Commit

Permalink
Register the ComboBox buttonNode with together, see #162
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Mar 10, 2015
1 parent 620f27d commit ddf6c58
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/ComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ define( function( require ) {
itemYMargin: 6,
itemHighlightFill: 'rgb(245,245,245)',
itemHighlightStroke: null,
itemHighlightLineWidth: 1
itemHighlightLineWidth: 1,
//together
buttonNodeComponentID: null // Must be specified if using together
},
options );

Expand Down Expand Up @@ -187,7 +189,7 @@ define( function( require ) {
up: function( event ) {

var archID = arch && arch.start( 'user', event.currentTarget.componentID, event.currentTarget.componentType, 'pressed' );

unhighlightItem( event.currentTarget );
listNode.visible = false; // close the list, do this before changing property value, in case it's expensive
self.getUniqueTrail().rootNode().removeInputListener( clickToDismissListener ); // remove the click-to-dismiss listener
Expand Down Expand Up @@ -297,6 +299,8 @@ define( function( require ) {
} );

this.mutate( options );

together && together.addComponent( options.buttonNodeComponentID, buttonNode );
}

inherit( Node, ComboBox );
Expand Down

0 comments on commit ddf6c58

Please sign in to comment.