fix selected node

This commit is contained in:
Mutasem 2021-11-11 12:16:17 +01:00
parent 17d9278b75
commit aafa7b79c3

View file

@ -1,5 +1,5 @@
<template>
<div class="node-wrapper" :style="nodePosition">
<div :class="{'node-wrapper': true, selected: isSelected}" :style="nodePosition">
<div class="select-background" v-show="isSelected"></div>
<div class="node-default" :data-name="data.name" :ref="data.name">
<div :class="nodeClass" :style="nodeStyle" @dblclick="setNodeActive" @click.left="mouseLeftClick" v-touch:start="touchStart" v-touch:end="touchEnd">
@ -114,10 +114,6 @@ export default mixins(externalHooks, nodeBase, nodeHelpers, workflowHelpers).ext
nodeClass () {
const classes = ['node-box'];
if (this.isSelected) {
classes.push('selected');
}
if (this.data.disabled) {
classes.push('disabled');
}
@ -478,13 +474,9 @@ export default mixins(externalHooks, nodeBase, nodeHelpers, workflowHelpers).ext
<style lang="scss">
/** node */
.node-box {
z-index: 1;
&.selected {
.node-wrapper.selected {
z-index: 2;
}
}
/** connector */
.jtk-connector {