Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

Gesture isEnabled

ppcano edited this page Aug 14, 2012 · 1 revision

You can enable/disable a gesture recognition based on the value of its isEnabled property.

var view = Em.View.create({
  
  tapOptions: {
    isEnabled: false
  },

  tapEnd: function(recognizer) {
   
  }

});

Normally, you will use bindings to configure the isEnabled property.

var view = Em.View.create({

  isTapEnabled: false,

  tapOptions: {
    isEnabledBinding: 'isTapEnabled'
  },

  tapEnd: function(recognizer) {
  }

});

You could also bind to global bindings App.controller.isEnabled, instead of a binding from its view.

Clone this wiki locally