diff --git a/packages/react-nipple/lib/ReactNipple.js b/packages/react-nipple/lib/ReactNipple.js index 41262e2..74a32e4 100644 --- a/packages/react-nipple/lib/ReactNipple.js +++ b/packages/react-nipple/lib/ReactNipple.js @@ -113,17 +113,17 @@ var ReactNipple = (_class = function (_Component) { value: function handleElement(ref) { this._element = ref; if (ref) { - this.createJoystick(this.props); + this.createJoystick(); } else if (this._element) { this.destroyJoystick(); } } }, { key: 'createJoystick', - value: function createJoystick(props) { + value: function createJoystick() { var options = _extends({ zone: this._element - }, props.options); + }, this.props.options); if (this.props.static) { options.mode = 'static'; @@ -145,8 +145,8 @@ var ReactNipple = (_class = function (_Component) { this.joystick = joystick; - if (props.onCreated) { - props.onCreated(this.joystick); + if (this.props.onCreated) { + this.props.onCreated(this.joystick); } } }, { diff --git a/packages/react-nipple/package.json b/packages/react-nipple/package.json index 272d5c3..d94bd56 100644 --- a/packages/react-nipple/package.json +++ b/packages/react-nipple/package.json @@ -1,6 +1,6 @@ { "name": "react-nipple", - "version": "1.0.2", + "version": "1.0.3", "main": "lib/index.js", "license": "MIT", "scripts": { diff --git a/packages/react-nipple/src/ReactNipple.js b/packages/react-nipple/src/ReactNipple.js index 3771c1f..9343a8a 100644 --- a/packages/react-nipple/src/ReactNipple.js +++ b/packages/react-nipple/src/ReactNipple.js @@ -112,15 +112,15 @@ export default class ReactNipple extends Component { handleElement(ref) { this._element = ref; if (ref) { - this.createJoystick(this.props); + this.createJoystick(); } else if (this._element) { this.destroyJoystick(); } } - createJoystick(props) { + createJoystick() { const options = { zone: this._element, - ...props.options + ...this.props.options }; if (this.props.static) { @@ -143,8 +143,8 @@ export default class ReactNipple extends Component { this.joystick = joystick; - if (props.onCreated) { - props.onCreated(this.joystick); + if (this.props.onCreated) { + this.props.onCreated(this.joystick); } } destroyJoystick() {