phetsims / proportion-playground

"Proportion Playground" is an educational simulation in HTML5, by PhET Interactive Simulations at the University of Colorado Boulder.
GNU General Public License v3.0
2 stars 4 forks source link

RadioButtonGroup (used for scene selection buttons) cursor issue #97

Closed jonathanolson closed 7 years ago

jonathanolson commented 7 years ago

It seems that the mouse-over cursor for the "selected" button is the default cursor, NOT the hand as I'd expect.

Seems to affect not just this sim, but other usages of the component (just added it into area-model and noticed).

@ariel-phet, thoughts on whether this could be changed to STAY as the hand-cursor like would be expected?

ariel-phet commented 7 years ago

@jonathanolson - honestly I have never noticed this behavior (since normally I only hover over the scene I would like to switch to). It has never caused any user interaction issues in its current state, and I doubt it would be a problem if the hand appeared as you expect.

If you wish to adjust it moving forward for PP and area-model, feel free. No maintainence releases or such necessary however.

jonathanolson commented 7 years ago

I'd also like to verify that no-one is relying on this behavior, tagging for developer meeting.

pixelzoom commented 7 years ago

OK with me to change the behavior. Current behavior doesn't bother me.

samreid commented 7 years ago

To me, having the arrow cursor over the selected radio button is a useful cue that you are already in that selection, and that pressing it would do nothing. What is the reason for changing this?

@mkaoudis and @Denz1994 agree about that

@aadish says it should only be a hand cursor if pressing the button would do something.

pixelzoom commented 7 years ago

Here's the related code in RadioButtonGroup, line 260:

    // make the unselected buttons pickable and have a pointer cursor
    property.link( function( value ) {
      if ( self.enabledProperty.get() ) {
        for ( i = 0; i < contentArray.length; i++ ) {
          if ( contentArray[ i ].value === value ) {
            buttons[ i ].pickable = false;
            buttons[ i ].cursor = null;
          }
          else {
            buttons[ i ].pickable = true;
            buttons[ i ].cursor = 'pointer';
          }
        }
      }
    } );
samreid commented 7 years ago

We decided the current behavior is desirable.