Skip to content

Commit

Permalink
only being interacted with if it would change the ratio, #341
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Feb 9, 2021
1 parent a4554e6 commit ddb8145
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/common/view/BothHandsInteractionListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class BothHandsInteractionListener {
* @private
*/
onValueIncrementDecrement( tupleField, inputMapper, increment ) {
this.isBeingInteractedWithProperty.value = true;
const currentTuple = this.ratioTupleProperty.value[ tupleField ];

const changeAmount = globalKeyStateTracker.shiftKeyDown ? this.shiftKeyboardStep : this.keyboardStep;
Expand Down Expand Up @@ -153,7 +154,6 @@ class BothHandsInteractionListener {
// their behavior during scenery event dispatch
sceneryEvent.pointer.reserveForKeyboardDrag();

this.isBeingInteractedWithProperty.value = true;

if ( event.key === 'ArrowDown' ) {
this.consequentInteractedWithProperty.value = true;
Expand All @@ -180,6 +180,8 @@ class BothHandsInteractionListener {
!event.getModifierState( 'Shift' ) &&
!event.getModifierState( 'Alt' ) ) {

this.isBeingInteractedWithProperty.value = true;

// If the ratio is locked, and the target is 1, this case means that going to 0:0 would be a buggy case.
// Here we will just disable this feature.
if ( this.ratioLockedProperty.value && this.targetRatioProperty.value === 1 && i === 0 ) {
Expand Down

0 comments on commit ddb8145

Please sign in to comment.