Separate hover interactions between func node and func node menu
parent
9a0687b43b
commit
6a54d4e65d
|
@ -54,14 +54,16 @@ export default class FuncNode extends PureComponent<Props, State> {
|
|||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className={this.nodeClassName}
|
||||
onClick={this.handleToggleEdit}
|
||||
title="Edit function arguments"
|
||||
>
|
||||
<div className="func-node--connector" />
|
||||
<div className="func-node--name">{func.name}</div>
|
||||
<FuncArgsPreview func={func} />
|
||||
<div className="func-node--wrapper">
|
||||
<div
|
||||
className={this.nodeClassName}
|
||||
onClick={this.handleToggleEdit}
|
||||
title="Edit function arguments"
|
||||
>
|
||||
<div className="func-node--connector" />
|
||||
<div className="func-node--name">{func.name}</div>
|
||||
<FuncArgsPreview func={func} />
|
||||
</div>
|
||||
{this.funcMenu}
|
||||
</div>
|
||||
{this.funcArgs}
|
||||
|
@ -146,6 +148,7 @@ export default class FuncNode extends PureComponent<Props, State> {
|
|||
confirmText="Delete this query"
|
||||
square={true}
|
||||
confirmAction={this.handleDelete}
|
||||
position="right"
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -144,6 +144,8 @@ $flux-invalid-hover: $c-dreamsicle;
|
|||
|
||||
&:hover,
|
||||
&.active {
|
||||
cursor: pointer !important;
|
||||
|
||||
.func-node--preview {
|
||||
color: $g20-white;
|
||||
}
|
||||
|
@ -196,7 +198,7 @@ $flux-invalid-hover: $c-dreamsicle;
|
|||
}
|
||||
|
||||
// When a query exists unassigned to a variable
|
||||
.func-node:first-child {
|
||||
.func-node--wrapper:first-child .func-node {
|
||||
margin-left: 0;
|
||||
padding-left: $flux-node-gap;
|
||||
.func-node--connector {
|
||||
|
@ -248,13 +250,14 @@ $flux-invalid-hover: $c-dreamsicle;
|
|||
}
|
||||
}
|
||||
|
||||
.func-node--wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.func-node--menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
transform: translate(100%, -50%);
|
||||
opacity: 0;
|
||||
transition: opacity 0.25s ease;
|
||||
|
||||
|
@ -264,9 +267,9 @@ $flux-invalid-hover: $c-dreamsicle;
|
|||
}
|
||||
}
|
||||
|
||||
.func-node:hover .func-node--menu,
|
||||
.func-node.editing .func-node--menu,
|
||||
.func-node.active .func-node--menu {
|
||||
.func-node--wrapper:hover .func-node--menu,
|
||||
.func-node.editing + .func-node--menu,
|
||||
.func-node.active + .func-node--menu {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue