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

react-aim

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-aim - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

14

lib/source.js

@@ -202,3 +202,3 @@ 'use strict';

if (_typeof(this.spec) === 'object' && this.spec && typeof this.spec.mouseEnter === 'function') {
this.spec.mouseEnter(this.refs.wrappedComponent.props, this.refs.wrappedComponent);
this.spec.mouseEnter(this.wrappedComponent.props, this.wrappedComponent);
}

@@ -210,3 +210,3 @@ }

if (_typeof(this.spec) === 'object' && this.spec && typeof this.spec.mouseLeave === 'function') {
this.spec.mouseLeave(this.refs.wrappedComponent.props, this.refs.wrappedComponent);
this.spec.mouseLeave(this.wrappedComponent.props, this.wrappedComponent);
}

@@ -217,5 +217,7 @@ }

value: function render() {
return _react2.default.createElement(WrappedComponent, _extends({
ref: 'wrappedComponent'
}, this.props));
var _this2 = this;
return _react2.default.createElement(WrappedComponent, _extends({ ref: function ref(_ref) {
return _this2.wrappedComponent = _ref;
} }, this.props));
}

@@ -225,3 +227,3 @@ }, {

get: function get() {
if (typeof this._target === 'function' && this.refs.wrappedComponent) return this._target(this.refs.wrappedComponent.props, this.refs.wrappedComponent);
if (typeof this._target === 'function' && this.wrappedComponent) return this._target(this.wrappedComponent.props, this.wrappedComponent);
return null;

@@ -228,0 +230,0 @@ }

@@ -186,3 +186,3 @@ 'use strict';

if (_typeof(this.spec) === 'object' && this.spec && typeof this.spec.aimStart === 'function') {
this.spec.aimStart(this.refs.wrappedComponent.props, this.refs.wrappedComponent, distance);
this.spec.aimStart(this.wrappedComponent.props, this.wrappedComponent, distance);
}

@@ -200,3 +200,3 @@ }

if (_typeof(this.spec) === 'object' && this.spec && typeof this.spec.aimMove === 'function') {
this.spec.aimMove(this.refs.wrappedComponent.props, this.refs.wrappedComponent, distance);
this.spec.aimMove(this.wrappedComponent.props, this.wrappedComponent, distance);
}

@@ -222,4 +222,4 @@ }

if (_typeof(_this3.spec) === 'object' && _this3.spec && typeof _this3.spec.aimStop === 'function') {
if (_this3.refs.wrappedComponent) {
_this3.spec.aimStop(_this3.refs.wrappedComponent.props, _this3.refs.wrappedComponent);
if (_this3.wrappedComponent) {
_this3.spec.aimStop(_this3.wrappedComponent.props, _this3.wrappedComponent);
}

@@ -244,3 +244,3 @@ }

if (_typeof(this.spec) === 'object' && this.spec && typeof this.spec.mouseEnter === 'function') {
this.spec.mouseEnter(this.refs.wrappedComponent.props, this.refs.wrappedComponent);
this.spec.mouseEnter(this.wrappedComponent.props, this.wrappedComponent);
}

@@ -252,3 +252,3 @@ }

if (_typeof(this.spec) === 'object' && this.spec && typeof this.spec.mouseLeave === 'function') {
this.spec.mouseLeave(this.refs.wrappedComponent.props, this.refs.wrappedComponent);
this.spec.mouseLeave(this.wrappedComponent.props, this.wrappedComponent);
}

@@ -259,5 +259,7 @@ }

value: function render() {
return _react2.default.createElement(WrappedComponent, _extends({
ref: 'wrappedComponent'
}, this.props));
var _this4 = this;
return _react2.default.createElement(WrappedComponent, _extends({ ref: function ref(_ref) {
return _this4.wrappedComponent = _ref;
} }, this.props));
}

@@ -267,3 +269,3 @@ }, {

get: function get() {
if (typeof this._source === 'function' && this.refs.wrappedComponent) return this._source(this.refs.wrappedComponent.props, this.refs.wrappedComponent);
if (typeof this._source === 'function' && this.wrappedComponent) return this._source(this.wrappedComponent.props, this.wrappedComponent);
return null;

@@ -270,0 +272,0 @@ }

{
"name": "react-aim",
"author": "Gabriel Bull",
"version": "0.2.2",
"version": "0.2.3",
"description": "Determine the cursor aim for triggering mouse events.",

@@ -6,0 +6,0 @@ "main": "./lib/index.js",

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