Comparing version 0.2.2 to 0.2.3
@@ -106,3 +106,3 @@ 'use strict'; | ||
this.updateBoundingRect(); | ||
var rect = this.updateBoundingRect(); | ||
document.addEventListener("mousemove", this.handleUpdate); | ||
@@ -118,3 +118,3 @@ document.addEventListener("touchmove", this.handleUpdate); | ||
this.setState({ active: true }); | ||
this.updatePosition({ x: x, y: y }); | ||
this.updatePosition({ x: x, y: y }, rect); | ||
// this.throttle(this.updatePosition, { x, y }); | ||
@@ -157,5 +157,4 @@ } | ||
clientY = _ref.y; | ||
var rect = this.state.rect; | ||
var rect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state.rect; | ||
if (options.single) { | ||
@@ -192,2 +191,8 @@ var value = this.props.vertical ? (rect.bottom - clientY) / rect.height : (clientX - rect.left) / rect.width; | ||
} | ||
/** | ||
* Findout the bounding rect - update state to send the rect to WrappedComponent | ||
* @return {Object} Returns rect for additional logic | ||
*/ | ||
}, { | ||
@@ -198,2 +203,3 @@ key: 'updateBoundingRect', | ||
this.setState({ rect: rect }); | ||
return rect; | ||
} | ||
@@ -200,0 +206,0 @@ }, { |
{ | ||
"name": "coloreact", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A tiny Color Picker for React", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33776
10
677
1