Skip to content

Commit

Permalink
use vibrationManager instead of navigator.vibrate, see #104
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Apr 26, 2022
1 parent 269ea9d commit f3b5847
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/quadrilateral/view/SideNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import QuadrilateralShapeModel from '../model/QuadrilateralShapeModel.js';
import QuadrilateralModel from '../model/QuadrilateralModel.js';
import { Line, Shape } from '../../../../kite/js/imports.js';
import QuadrilateralColors from '../../common/QuadrilateralColors.js';
import vibrationManager from '../../../../tappi/js/vibrationManager.js';

// The dilation around side shapes when drawing the focus highlight.
const FOCUS_HIGHLIGHT_DILATION = 15;
Expand Down Expand Up @@ -261,10 +262,10 @@ class SideNode extends Voicing( Path, 1 ) {

if ( navigator !== undefined && navigator.vibrate !== undefined ) {
if ( isPressed ) {
navigator.vibrate( [ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200 ] );
vibrationManager.startVibrate( [ 200, 200 ] );
}
else {
navigator.vibrate( 0 );
vibrationManager.stopVibrate();
}
}
} );
Expand Down

0 comments on commit f3b5847

Please sign in to comment.