rc-tooltip
Advanced tools
Comparing version 2.10.0 to 2.10.1
@@ -34,2 +34,6 @@ 'use strict'; | ||
componentDidMount: function componentDidMount() { | ||
this.rootNode = this.getPopupDomNode(); | ||
}, | ||
// optimize for speed | ||
@@ -79,15 +83,22 @@ shouldComponentUpdate: function shouldComponentUpdate(nextProps) { | ||
var prefixCls = props.prefixCls; | ||
var placement = props.placement; | ||
var style = props.style; | ||
var className = (0, _utils.getToolTipClassByPlacement)(prefixCls, props.placement); | ||
if (props.className) { | ||
className += ' ' + props.className; | ||
var className = undefined; | ||
if (props.visible || !this.rootNode) { | ||
className = (0, _utils.getToolTipClassByPlacement)(prefixCls, props.placement); | ||
if (props.className) { | ||
className += ' ' + props.className; | ||
} | ||
} else { | ||
// fix auto adjust | ||
className = this.rootNode.className; | ||
var hiddenClass = prefixCls + '-hidden'; | ||
if (className.indexOf(hiddenClass) === -1) { | ||
className += ' ' + hiddenClass; | ||
} | ||
} | ||
var style = this.props.style; | ||
if (!props.visible) { | ||
className += ' ' + prefixCls + '-hidden'; | ||
} | ||
var arrowClassName = prefixCls + '-arrow'; | ||
var innerClassname = prefixCls + '-inner'; | ||
var placement = props.placement; | ||
var align = undefined; | ||
@@ -94,0 +105,0 @@ if (placement && placement.points) { |
@@ -35,31 +35,39 @@ 'use strict'; | ||
points: ['cr', 'cl'], | ||
overflow: autoAdjustOverflow | ||
overflow: autoAdjustOverflow, | ||
offset: [-3, 0] | ||
}, | ||
right: { | ||
points: ['cl', 'cr'], | ||
overflow: autoAdjustOverflow | ||
overflow: autoAdjustOverflow, | ||
offset: [3, 0] | ||
}, | ||
top: { | ||
points: ['bc', 'tc'], | ||
overflow: autoAdjustOverflow | ||
overflow: autoAdjustOverflow, | ||
offset: [0, -3] | ||
}, | ||
bottom: { | ||
points: ['tc', 'bc'], | ||
overflow: autoAdjustOverflow | ||
overflow: autoAdjustOverflow, | ||
offset: [0, 3] | ||
}, | ||
topLeft: { | ||
points: ['bl', 'tl'], | ||
overflow: autoAdjustOverflow | ||
overflow: autoAdjustOverflow, | ||
offset: [0, -3] | ||
}, | ||
topRight: { | ||
points: ['br', 'tr'], | ||
overflow: autoAdjustOverflow | ||
overflow: autoAdjustOverflow, | ||
offset: [0, -3] | ||
}, | ||
bottomRight: { | ||
points: ['tr', 'br'], | ||
overflow: autoAdjustOverflow | ||
overflow: autoAdjustOverflow, | ||
offset: [0, 3] | ||
}, | ||
bottomLeft: { | ||
points: ['tl', 'bl'], | ||
overflow: autoAdjustOverflow | ||
overflow: autoAdjustOverflow, | ||
offset: [0, 3] | ||
} | ||
@@ -66,0 +74,0 @@ }; |
{ | ||
"name": "rc-tooltip", | ||
"version": "2.10.0", | ||
"version": "2.10.1", | ||
"description": "tooltip ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
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
29021
686