Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/PinchableMixin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var PropTypes = require('prop-types');
var React = require('react');

Expand Down Expand Up @@ -28,7 +30,7 @@ var Mixin = {
}
var touches = event.touches;
this._initialPinch = getPinchProps(touches);
this._initialPinch = Object.assign(this._initialPinch, {
this._initialPinch = _extends(this._initialPinch, {
displacement: { x: 0, y: 0 },
displacementVelocity: { x: 0, y: 0 },
rotation: 0,
Expand Down Expand Up @@ -80,7 +82,7 @@ var Mixin = {

onPinchEnd: function onPinchEnd(event) {
// TODO use helper to order touches by identifier and use actual values on touchEnd.
var currentPinch = Object.assign({}, this._lastPinch);
var currentPinch = _extends({}, this._lastPinch);
currentPinch.time = Date.now();

if (currentPinch.time - this._lastPinch.time > 16) {
Expand Down
4 changes: 3 additions & 1 deletion lib/TapAndPinchable.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var TappableMixin = require('./TappableMixin');
var PinchableMixin = require('./PinchableMixin');
var getComponent = require('./getComponent');
Expand All @@ -9,7 +11,7 @@ var Component = getComponent([TappableMixin, PinchableMixin]);

module.exports = Component;
module.exports.touchStyles = touchStyles;
module.exports.Mixin = Object.assign({}, TappableMixin, {
module.exports.Mixin = _extends({}, TappableMixin, {
onPinchStart: PinchableMixin.onPinchStart,
onPinchMove: PinchableMixin.onPinchMove,
onPinchEnd: PinchableMixin.onPinchEnd
Expand Down
6 changes: 4 additions & 2 deletions lib/getComponent.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var createReactClass = require('create-react-class');
var PropTypes = require('prop-types');
var React = require('react');
Expand Down Expand Up @@ -44,9 +46,9 @@ module.exports = function (mixins) {
}

var style = {};
Object.assign(style, touchStyles, props.style);
_extends(style, touchStyles, props.style);

var newComponentProps = Object.assign({}, props, {
var newComponentProps = _extends({}, props, {
style: style,
className: className,
disabled: props.disabled,
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^4.1.3",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babelify": "^8.0.0",
Expand All @@ -35,6 +36,9 @@
"presets": [
"es2015",
"react"
],
"plugins": [
"transform-object-assign"
]
},
"browserify-shim": {
Expand Down