react-tooltipper
Advanced tools
Comparing version 0.7.7 to 0.7.8
@@ -12,2 +12,3 @@ var React = require('react/addons'), | ||
options: { | ||
closeOnAnyClick: false, | ||
completeCallback: undefined, | ||
@@ -398,3 +399,5 @@ doDebounceResize: true, | ||
target = tooltipData && tooltipData.selector ? document.querySelector(tooltipData.selector) : null, | ||
cssPosition = target ? target.style.position : null; | ||
cssPosition = tooltipper.options.showOverlay ? | ||
(target ? target.style.position : null) : | ||
(tooltipper.options.closeOnAnyClick ? 'absolute' : 'fixed'); | ||
@@ -406,2 +409,3 @@ if (target) { | ||
browser: tooltipper.getBrowser(), | ||
closeOnAnyClick: tooltipper.options.closeOnAnyClick, | ||
cssPosition: cssPosition, | ||
@@ -408,0 +412,0 @@ overridePosition: tooltipper.options.overridePosition, |
@@ -99,2 +99,18 @@ var React = require('react/addons'); | ||
if (!props.showOverlay && !props.closeOnAnyClick) { | ||
return ( | ||
React.createElement('div', { | ||
className: 'tooltipper-tooltip ' + opts.positionClass + (props.animate ? ' animate' : ''), | ||
style: opts.tooltipStyles | ||
}, | ||
React.createElement('div', { | ||
className: 'triangle triangle-' + opts.positionClass, | ||
style: opts.arrowPosition | ||
}), | ||
opts.header, | ||
React.createElement('main', { dangerouslySetInnerHTML: { __html: props.tooltipData.text || '' } }) | ||
) | ||
); | ||
} | ||
return ( | ||
@@ -101,0 +117,0 @@ React.createElement('div', { |
{ | ||
"name": "react-tooltipper", | ||
"version": "0.7.7", | ||
"version": "0.7.8", | ||
"description": "Create and trigger responsive tooltips for your ReactJS apps", | ||
@@ -5,0 +5,0 @@ "author": "Jason Rogers <jason@jmichaelrogers.com>", |
@@ -101,2 +101,5 @@ React Tooltipper | ||
**closeOnAnyClick** {boolean}: If true, close tooltips if the user clicks *anywhere*. If false, close | ||
tooltips only when the user clicks on the 'x' for the tooltip. Defaults to `false`. | ||
**completeCallback** {function}: It will be called after a closes the tooltip. Defaults to `undefined` | ||
@@ -138,2 +141,9 @@ | ||
### this.tooltipperForceCalcPlacement() | ||
Call this method to force a tooltip or beacon to recalculate its positioning. Typically, this happens | ||
automatically, so you should only really need to call this method if (for example) an element is added | ||
to or removed from the DOM and this should have an effect on the beacon's/tooltip's placement. | ||
## tooltipData Syntax | ||
@@ -140,0 +150,0 @@ There are 4 usable options but you can pass extra parameters. |
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
50276
843
209