react-tooltipper
Advanced tools
Comparing version 0.9.0 to 1.0.0
var React = require('react'); | ||
var PureRenderMixin = require('react-addons-pure-render-mixin') | ||
var PureRenderMixin = require('react-addons-pure-render-mixin'); | ||
@@ -4,0 +4,0 @@ var Beacon = React.createClass({ |
@@ -280,12 +280,13 @@ var React = require('react'), | ||
tooltipper.listeners.resize = tooltipper.calcPlacement.bind(this); | ||
} else { | ||
tooltipper.listeners.resize = (function() { | ||
} | ||
else { | ||
tooltipper.listeners.resize = (function () { | ||
var timeoutId; | ||
return function() { | ||
return function () { | ||
clearTimeout(timeoutId); | ||
timeoutId = setTimeout(function() { | ||
timeoutId = setTimeout(function () { | ||
timeoutId = null; | ||
tooltipper.calcPlacement.call(tooltipper.mixin); | ||
}, 200); | ||
} | ||
}; | ||
}()); | ||
@@ -324,3 +325,4 @@ } | ||
this._tooltipperUnrenderLayer(); | ||
} else if (state._tooltipperShouldBeActive && (opt.toggleTooltip || opt.newX || opt.newY) && opt.hasTooltipData) { | ||
} | ||
else if (state._tooltipperShouldBeActive && (opt.toggleTooltip || opt.newX || opt.newY) && opt.hasTooltipData) { | ||
this._tooltipperRenderLayer(); | ||
@@ -349,5 +351,7 @@ } | ||
*/ | ||
tooltipperSetTooltipData: function(tooltipData) { | ||
// clone the data so that we don't accidentally mutate whatever was passed | ||
Object.keys(tooltipData).forEach(function(key) { | ||
tooltipperSetTooltipData: function (tooltipData) { | ||
tooltipper.tooltipData = {}; // reset first | ||
// clone the data (shallowly) so that we don't accidentally mutate whatever was passed | ||
Object.keys(tooltipData).forEach(function (key) { | ||
tooltipper.tooltipData[key] = tooltipData[key]; | ||
@@ -359,2 +363,4 @@ }); | ||
* Change the default options | ||
* | ||
* @param {object} opts - tooltipper setup options | ||
*/ | ||
@@ -366,3 +372,3 @@ tooltipperSetOptions: function (opts) { | ||
} | ||
}) | ||
}); | ||
}, | ||
@@ -375,3 +381,3 @@ | ||
*/ | ||
tooltipperForceCalcPlacement: function() { | ||
tooltipperForceCalcPlacement: function () { | ||
tooltipper.calcPlacement.call(this); | ||
@@ -378,0 +384,0 @@ }, |
{ | ||
"name": "react-tooltipper", | ||
"version": "0.9.0", | ||
"version": "1.0.0", | ||
"description": "Create and trigger responsive tooltips for your ReactJS apps", | ||
@@ -5,0 +5,0 @@ "author": "Jason Rogers <jason@jmichaelrogers.com>", |
@@ -112,3 +112,3 @@ React Tooltipper | ||
**completeCallback** {function}: It will be called after a closes the tooltip. Defaults to `undefined` | ||
**completeCallback** {function}: It will be called after a user closes the tooltip. Defaults to `undefined` | ||
@@ -115,0 +115,0 @@ **doDebounceResize** {boolean}: Do or do not debounce the resize event listenre. Defaults to `true` |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 6 instances in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
783
1
0
51656
11