Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-tooltip

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-tooltip - npm Package Compare versions

Comparing version 2.10.0 to 2.10.1

29

lib/Popup.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc