Skip to content

Commit

Permalink
experiment with allowTouchSnag:false for functions, #29
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed May 18, 2016
1 parent 1a64a19 commit c531410
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion js/common/view/FunctionNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ define( function( require ) {
*/
function FunctionNode( functionInstance, contentNode, container, builderNode, dragLayer, options ) {

options = options || {};
options = _.extend( {
allowTouchSnag: false // see https://github.com/phetsims/function-builder/issues/29
}, options );

var thisNode = this;

Expand Down
5 changes: 3 additions & 2 deletions js/common/view/MovableNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ define( function( require ) {
function MovableNode( movable, options ) {

options = _.extend( {

allowTouchSnag: true, // {boolean} allow touch swipes across this Node to pick it up
cursor: 'pointer',
startDrag: null, // {function|null} Called at the start of each drag sequence
endDrag: null, // {function|null} Called at the end of each drag sequence
Expand Down Expand Up @@ -53,8 +55,7 @@ define( function( require ) {

this.addInputListener( new SimpleDragHandler( {

// allow touch swipes across this Node to pick it up
allowTouchSnag: true,
allowTouchSnag: options.allowTouchSnag,

start: function( event, trail ) {

Expand Down

0 comments on commit c531410

Please sign in to comment.