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

react-hammerjs

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hammerjs - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

2

bower.json
{
"name": "react-hammerjs",
"main": "dist/react-hammerjs.min.js",
"version": "0.1.3",
"version": "0.1.4",
"homepage": "https://github.com/JedWatson/react-hammerjs",

@@ -6,0 +6,0 @@ "authors": [

@@ -41,10 +41,10 @@ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Hammer=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

this.hammer = new Hammer(this.getDOMNode());
if (this.props.action) this.hammer.on('tap press', this.props.action);
if (this.props.onTap) this.hammer.on('tap', this.props.onTap);
if (this.props.onDoubleTap) this.hammer.on('doubletap', this.props.onDoubleTap);
if (this.props.onPan) this.hammer.on('pan', this.props.onPan);
if (this.props.onSwipe) this.hammer.on('swipe', this.props.onSwipe);
if (this.props.onPress) this.hammer.on('press', this.props.onPress);
if (this.props.onPinch) this.hammer.on('pinch', this.props.onPinch);
if (this.props.onRotate) this.hammer.on('rotate', this.props.onRotate);
if (this.props.action) this.hammer.on('tap press', this.props.action);
if (this.props.onTap) this.hammer.on('tap', this.props.onTap);
if (this.props.onDoubleTap) this.hammer.on('doubletap', this.props.onDoubleTap);
if (this.props.onPan) this.hammer.on('pan panmove panend pancancel panleft panright panup pandow', this.props.onPan);
if (this.props.onSwipe) this.hammer.on('swipe', this.props.onSwipe);
if (this.props.onPress) this.hammer.on('press', this.props.onPress);
if (this.props.onPinch) this.hammer.on('pinch', this.props.onPinch);
if (this.props.onRotate) this.hammer.on('rotate', this.props.onRotate);
},

@@ -51,0 +51,0 @@

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o;"undefined"!=typeof window?o=window:"undefined"!=typeof global?o=global:"undefined"!=typeof self&&(o=self),o.Hammer=e()}}(function(){return function e(o,n,t){function r(s,p){if(!n[s]){if(!o[s]){var a="function"==typeof require&&require;if(!p&&a)return a(s,!0);if(i)return i(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var f=n[s]={exports:{}};o[s][0].call(f.exports,function(e){var n=o[s][1][e];return r(n?n:e)},f,f.exports,e,o,n,t)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<t.length;s++)r(t[s]);return r}({1:[function(e,o){(function(n){var t="undefined"!=typeof window?window.React:"undefined"!=typeof n?n.React:null,r=e("hammerjs"),i={component:!0,children:!0,action:!0,onTap:!0,onDoubleTap:!0,onPan:!0,onSwipe:!0,onPress:!0,onPinch:!0,onRotate:!0},s=t.createClass({displayName:"Hammer",propTypes:{component:t.PropTypes.any,className:t.PropTypes.string},getDefaultProps:function(){return{component:"span"}},componentDidMount:function(){this.hammer=new r(this.getDOMNode()),this.props.action&&this.hammer.on("tap press",this.props.action),this.props.onTap&&this.hammer.on("tap",this.props.onTap),this.props.onDoubleTap&&this.hammer.on("doubletap",this.props.onDoubleTap),this.props.onPan&&this.hammer.on("pan",this.props.onPan),this.props.onSwipe&&this.hammer.on("swipe",this.props.onSwipe),this.props.onPress&&this.hammer.on("press",this.props.onPress),this.props.onPinch&&this.hammer.on("pinch",this.props.onPinch),this.props.onRotate&&this.hammer.on("rotate",this.props.onRotate)},componentWillUnmount:function(){this.hammer.stop(),this.hammer.destroy(),this.hammer=null},render:function(){var e={};return Object.keys(this.props).forEach(function(o){i[o]||(e[o]=this.props[o])},this),t.createElement(this.props.component,e,this.props.children)}});o.exports=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{hammerjs:void 0}]},{},[1])(1)});
!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Hammer=n()}}(function(){return function n(e,o,t){function p(i,s){if(!o[i]){if(!e[i]){var a="function"==typeof require&&require;if(!s&&a)return a(i,!0);if(r)return r(i,!0);var h=new Error("Cannot find module '"+i+"'");throw h.code="MODULE_NOT_FOUND",h}var f=o[i]={exports:{}};e[i][0].call(f.exports,function(n){var o=e[i][1][n];return p(o?o:n)},f,f.exports,n,e,o,t)}return o[i].exports}for(var r="function"==typeof require&&require,i=0;i<t.length;i++)p(t[i]);return p}({1:[function(n,e){(function(o){var t="undefined"!=typeof window?window.React:"undefined"!=typeof o?o.React:null,p=n("hammerjs"),r={component:!0,children:!0,action:!0,onTap:!0,onDoubleTap:!0,onPan:!0,onSwipe:!0,onPress:!0,onPinch:!0,onRotate:!0},i=t.createClass({displayName:"Hammer",propTypes:{component:t.PropTypes.any,className:t.PropTypes.string},getDefaultProps:function(){return{component:"span"}},componentDidMount:function(){this.hammer=new p(this.getDOMNode()),this.props.action&&this.hammer.on("tap press",this.props.action),this.props.onTap&&this.hammer.on("tap",this.props.onTap),this.props.onDoubleTap&&this.hammer.on("doubletap",this.props.onDoubleTap),this.props.onPan&&this.hammer.on("pan panmove panend pancancel panleft panright panup pandow",this.props.onPan),this.props.onSwipe&&this.hammer.on("swipe",this.props.onSwipe),this.props.onPress&&this.hammer.on("press",this.props.onPress),this.props.onPinch&&this.hammer.on("pinch",this.props.onPinch),this.props.onRotate&&this.hammer.on("rotate",this.props.onRotate)},componentWillUnmount:function(){this.hammer.stop(),this.hammer.destroy(),this.hammer=null},render:function(){var n={};return Object.keys(this.props).forEach(function(e){r[e]||(n[e]=this.props[e])},this),t.createElement(this.props.component,n,this.props.children)}});e.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{hammerjs:void 0}]},{},[1])(1)});
{
"name": "react-hammerjs",
"version": "0.1.3",
"version": "0.1.4",
"description": "ReactJS / HammerJS integration. Support touch events in your React app.",

@@ -14,3 +14,3 @@ "main": "src/Hammer.js",

"hammerjs": "^2.0.4",
"react": "^0.12.0"
"react": ">=0.12.0"
},

@@ -17,0 +17,0 @@ "devDependencies": {

@@ -6,3 +6,5 @@ React-HammerJS

If you're looking for native tap event handling in ReactJS, check out my [react-tappable](https://github.com/JedWatson/react-tappable) package.
## Installation

@@ -9,0 +11,0 @@

@@ -39,10 +39,10 @@ var React = require('react'),

this.hammer = new Hammer(this.getDOMNode());
if (this.props.action) this.hammer.on('tap press', this.props.action);
if (this.props.onTap) this.hammer.on('tap', this.props.onTap);
if (this.props.onDoubleTap) this.hammer.on('doubletap', this.props.onDoubleTap);
if (this.props.onPan) this.hammer.on('pan', this.props.onPan);
if (this.props.onSwipe) this.hammer.on('swipe', this.props.onSwipe);
if (this.props.onPress) this.hammer.on('press', this.props.onPress);
if (this.props.onPinch) this.hammer.on('pinch', this.props.onPinch);
if (this.props.onRotate) this.hammer.on('rotate', this.props.onRotate);
if (this.props.action) this.hammer.on('tap press', this.props.action);
if (this.props.onTap) this.hammer.on('tap', this.props.onTap);
if (this.props.onDoubleTap) this.hammer.on('doubletap', this.props.onDoubleTap);
if (this.props.onPan) this.hammer.on('pan panmove panend pancancel panleft panright panup pandow', this.props.onPan);
if (this.props.onSwipe) this.hammer.on('swipe', this.props.onSwipe);
if (this.props.onPress) this.hammer.on('press', this.props.onPress);
if (this.props.onPinch) this.hammer.on('pinch', this.props.onPinch);
if (this.props.onRotate) this.hammer.on('rotate', this.props.onRotate);
},

@@ -49,0 +49,0 @@

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