react-animationjs
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -20,2 +20,6 @@ 'use strict'; | ||
var _reactDom = require('react-dom'); | ||
var _reactDom2 = _interopRequireDefault(_reactDom); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -125,3 +129,3 @@ | ||
var style = this.props.style; | ||
var styleEl = this.props.styleEl; | ||
var cur = this.children.cur; | ||
@@ -132,3 +136,3 @@ | ||
'g', | ||
{ style: _extends({}, style) }, | ||
{ style: _extends({}, styleEl) }, | ||
cur.filter(filterNullEls).map(function (child, i) { | ||
@@ -172,2 +176,5 @@ return _react2.default.cloneElement(child, { key: i, ref: _this2.addTarget }); | ||
this.addTarget = function (newTarget) { | ||
if (newTarget instanceof _react.Component) { | ||
newTarget = _reactDom2.default.findDOMNode(newTarget); | ||
} | ||
_this3.targets = [].concat(_toConsumableArray(_this3.targets), [newTarget]).filter(filterNullEls); | ||
@@ -174,0 +181,0 @@ }; |
{ | ||
"name": "react-animationjs", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "(ノ´ヮ´)ノ*:・゚✧ A super easy animation library for React.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
import React, { Component } from 'react'; | ||
import isEqual from 'lodash.isequal'; | ||
import ReactDOM from 'react-dom'; | ||
const anime = typeof window !== 'undefined' ? require('animejs') : _ => _; | ||
@@ -92,2 +93,5 @@ | ||
addTarget = newTarget => { | ||
if ( newTarget instanceof Component ) { | ||
newTarget = ReactDOM.findDOMNode(newTarget); | ||
} | ||
this.targets = [...this.targets, newTarget].filter(filterNullEls); | ||
@@ -100,7 +104,7 @@ } | ||
render() { | ||
let { style } = this.props; | ||
let { styleEl } = this.props; | ||
let { cur } = this.children; | ||
return ( | ||
<g style={{ ...style }}> | ||
<g style={{ ...styleEl }}> | ||
{ | ||
@@ -107,0 +111,0 @@ cur |
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
81795
2382