react-hammerjs
Advanced tools
Comparing version 0.1.3 to 0.1.4
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13618
48
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedreact@18.3.1(transitive)
- Removedacorn@5.7.4(transitive)
- Removedamdefine@1.0.1(transitive)
- Removedast-types@0.9.6(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbase62@1.2.8(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedcommander@2.20.3(transitive)
- Removedcommoner@0.10.8(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddefined@1.0.1(transitive)
- Removeddetective@4.7.1(transitive)
- Removedenvify@3.4.1(transitive)
- Removedesprima@3.1.3(transitive)
- Removedesprima-fb@15001.1.0-dev-harmony-fb(transitive)
- Removedglob@5.0.15(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedjstransform@11.0.3(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedobject-assign@2.1.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedprivate@0.1.8(transitive)
- Removedq@1.5.1(transitive)
- Removedreact@0.12.2(transitive)
- Removedrecast@0.11.23(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsource-map@0.4.40.5.7(transitive)
- Removedthrough@2.3.8(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedreact@>=0.12.0