mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
feat(editor): Adjust selection rectangle to include node selection box on new canvas (no-changelog) (#11088)
This commit is contained in:
parent
e5c7215bca
commit
b925791c15
|
@ -44,16 +44,14 @@ const connectionType = computed(() =>
|
||||||
: NodeConnectionType.Main,
|
: NodeConnectionType.Main,
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderToolbar = computed(() => (props.selected || isHovered.value) && !props.readOnly);
|
const renderToolbar = computed(() => isHovered.value && !props.readOnly);
|
||||||
|
|
||||||
const isMainConnection = computed(() => data.value.source.type === NodeConnectionType.Main);
|
const isMainConnection = computed(() => data.value.source.type === NodeConnectionType.Main);
|
||||||
|
|
||||||
const status = computed(() => props.data.status);
|
const status = computed(() => props.data.status);
|
||||||
|
|
||||||
const edgeColor = computed(() => {
|
const edgeColor = computed(() => {
|
||||||
if (props.selected) {
|
if (status.value === 'success') {
|
||||||
return 'var(--color-background-dark)';
|
|
||||||
} else if (status.value === 'success') {
|
|
||||||
return 'var(--color-success)';
|
return 'var(--color-success)';
|
||||||
} else if (status.value === 'pinned') {
|
} else if (status.value === 'pinned') {
|
||||||
return 'var(--color-secondary)';
|
return 'var(--color-secondary)';
|
||||||
|
@ -61,6 +59,8 @@ const edgeColor = computed(() => {
|
||||||
return 'var(--color-primary)';
|
return 'var(--color-primary)';
|
||||||
} else if (!isMainConnection.value) {
|
} else if (!isMainConnection.value) {
|
||||||
return 'var(--node-type-supplemental-color)';
|
return 'var(--node-type-supplemental-color)';
|
||||||
|
} else if (props.selected) {
|
||||||
|
return 'var(--color-background-dark)';
|
||||||
} else {
|
} else {
|
||||||
return 'var(--color-foreground-xdark)';
|
return 'var(--color-foreground-xdark)';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
/**
|
||||||
|
* Resizer
|
||||||
|
*/
|
||||||
|
|
||||||
.vue-flow__resize-control.line {
|
.vue-flow__resize-control.line {
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
@ -32,6 +36,10 @@
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minimap
|
||||||
|
*/
|
||||||
|
|
||||||
.vue-flow__minimap {
|
.vue-flow__minimap {
|
||||||
height: 120px;
|
height: 120px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -50,6 +58,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pane
|
||||||
|
*/
|
||||||
|
|
||||||
.vue-flow__pane {
|
.vue-flow__pane {
|
||||||
&,
|
&,
|
||||||
&.draggable {
|
&.draggable {
|
||||||
|
@ -57,6 +69,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Node
|
||||||
|
*/
|
||||||
|
|
||||||
.vue-flow__node {
|
.vue-flow__node {
|
||||||
&,
|
&,
|
||||||
&.draggable {
|
&.draggable {
|
||||||
|
@ -71,3 +87,14 @@
|
||||||
z-index: 1 !important;
|
z-index: 1 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Selection
|
||||||
|
*/
|
||||||
|
|
||||||
|
.vue-flow__nodesselection-rect {
|
||||||
|
box-sizing: content-box;
|
||||||
|
margin-top: calc(-1 * var(--spacing-2xs));
|
||||||
|
margin-left: calc(-1 * var(--spacing-2xs));
|
||||||
|
padding: var(--spacing-2xs);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue