mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
⚡ Improve plus endpoint string rendering
This commit is contained in:
parent
bd9c822a58
commit
7a64a05088
|
@ -181,6 +181,7 @@ export const nodeBase = mixins(
|
||||||
hover: false,
|
hover: false,
|
||||||
showOutputLabel: nodeTypeData.outputs.length === 1,
|
showOutputLabel: nodeTypeData.outputs.length === 1,
|
||||||
size: nodeTypeData.outputs.length >= 3 ? 'small' : 'medium',
|
size: nodeTypeData.outputs.length >= 3 ? 'small' : 'medium',
|
||||||
|
hoverMessage: this.$baseText('nodesBase.clickToAddNodeOrDragToConnect'),
|
||||||
},
|
},
|
||||||
endpointHoverStyle: {
|
endpointHoverStyle: {
|
||||||
fill: getStyleTokenValue('--color-primary'),
|
fill: getStyleTokenValue('--color-primary'),
|
||||||
|
@ -204,14 +205,6 @@ export const nodeBase = mixins(
|
||||||
index: i,
|
index: i,
|
||||||
totalEndpoints: nodeTypeData.outputs.length,
|
totalEndpoints: nodeTypeData.outputs.length,
|
||||||
};
|
};
|
||||||
|
|
||||||
const _plusEndpoint = this.instance.getEndpoint(
|
|
||||||
CanvasHelpers.getOutputEndpointUUID(this.nodeIndex, index),
|
|
||||||
);
|
|
||||||
|
|
||||||
const dropHoverMessageDiv = _plusEndpoint.canvas.children[1].children[1];
|
|
||||||
|
|
||||||
dropHoverMessageDiv.innerHTML = this.$baseText('nodesBase.clickToAddNodeOrDragToConnect');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -461,6 +461,11 @@
|
||||||
this.size = endpointStyle.size || this.size;
|
this.size = endpointStyle.size || this.size;
|
||||||
this.showOutputLabel = !!endpointStyle.showOutputLabel;
|
this.showOutputLabel = !!endpointStyle.showOutputLabel;
|
||||||
|
|
||||||
|
if (this.hoverMessage !== endpointStyle.hoverMessage) {
|
||||||
|
this.hoverMessage = endpointStyle.hoverMessage;
|
||||||
|
message.innerHTML = endpointStyle.hoverMessage;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.size !== 'medium') {
|
if (this.size !== 'medium') {
|
||||||
container.classList.add(this.size);
|
container.classList.add(this.size);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue