Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-gestures

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-gestures

Gesture and Mobile support for Ambitious Ember Applications

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
decreased by-26.58%
Maintainers
1
Weekly downloads
 
Created
Source

Ember Gestures

Stories in Ready

npm version Build Status Ember Observer Score

Gesture and Mobile support for Ambitious Ember Applications.

###Changelog

dependencies devDependency Status

##Installation

ember install ember-gestures

Out of the Box

When you run the default blueprint (runs by default when you do ember install or by ember g ember-gestures), this addon will install HammerJS 2.0.5.

The addon wires HammerJS into your app as a global (Hammer), and provides various means by which to use HammerJS in your app. All manager instances created by this addon will emit domEvents, which Ember has been configured to utilize. This means that using Hammer with Ember is just like using any other event with ember, you add event handlers to your views or components.

For example

import Ember from 'ember';

const {
  Component
} = Ember;

export default Component.extend({
  panStart(e) {
     ... do something with the event ...
    }
});

But before you can do the above, you'll have to ensure your app knows what gestures to recognize. Don't fret, in even advanced cases, getting gestures available throughout your app will take only a few minutes of configuration, not a day of figuring things out. See Usage for more details and examples of how to setup recognizers in your app.

In the Box

In addition to the basic hammer functionality present in the box, ember-gestures comes with several blueprints for advanced usage which you can install separately.

Custom Recognizers.

Additional Recognizers.

Using Hammer Globally

Event Delegation

Components to help you get started.

##Usage

##Configuration

##touchZone

Sometimes smaller buttons or critical buttons need a larger capture area than their visible area. You can increase the area that recognizes touch events for a specific button https://gist.github.com/runspired/506f39a4abb2be48d63f

Writing Tests

Ensuring a manager is configured correctly.

Using the triggerGesture helper.

Using the trigger helper.

Important The jQuery events you need to trigger are the Hammer variant, meaning it is entirely lowercase swiperight, panup.

Tips and Tricks

Don't bind within {{#each}}, use a base recognizer instead.

Keywords

FAQs

Package last updated on 14 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc