mirror of
https://github.com/xodio/xod.git
synced 2026-03-14 12:46:54 +01:00
Merge pull request #1094 from xodio/tweak-dont-show-tooltip-for-dragged-nodes
Don’t show tooltip for dragged node
This commit is contained in:
@@ -72,18 +72,18 @@ class Node extends React.Component {
|
||||
position,
|
||||
size,
|
||||
type,
|
||||
isDragged,
|
||||
} = this.props;
|
||||
|
||||
const pinsArr = R.values(pins);
|
||||
|
||||
const cls = classNames('Node', {
|
||||
'is-selected': this.props.isSelected,
|
||||
'is-dragged': this.props.isDragged,
|
||||
'is-dragged': isDragged,
|
||||
'is-ghost': this.props.isGhost,
|
||||
'is-errored': (this.props.errors.length > 0),
|
||||
});
|
||||
|
||||
|
||||
const svgStyle = {
|
||||
overflow: 'visible',
|
||||
opacity: this.props.hidden ? 0 : 1, // setting visibility is breaking masks
|
||||
@@ -102,7 +102,7 @@ class Node extends React.Component {
|
||||
|
||||
return (
|
||||
<TooltipHOC
|
||||
content={renderTooltipContent(type, nodeLabel, errMessage)}
|
||||
content={isDragged ? null : renderTooltipContent(type, nodeLabel, errMessage)}
|
||||
render={(onMouseOver, onMouseMove, onMouseLeave) => (
|
||||
<svg
|
||||
key={id}
|
||||
|
||||
@@ -46,6 +46,8 @@ class Tooltip extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
if (!this.state.content) return null;
|
||||
|
||||
const cls = cn('Tooltip', {
|
||||
'is-visible': this.state.shown,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user