From 3602b117d141e46b825c907134a4e4043819a373 Mon Sep 17 00:00:00 2001 From: Mutasem Date: Fri, 29 Oct 2021 09:26:34 +0200 Subject: [PATCH] fix zoomout issue --- packages/editor-ui/src/views/NodeView.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index 3da501953e..cceb2e4482 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -419,11 +419,19 @@ export default mixins( backgroundStyle (): object { const scale = this.nodeViewScale; const offsetPosition = this.$store.getters.getNodeViewOffsetPosition; - return { - 'background-size': `${50 * scale}px ${50 * scale}px`, + const squareSize = 50 * scale; + const dotSize = 3 * scale; + const styles: object = { + 'background-size': `${squareSize}px ${squareSize}px`, 'background-position': `left ${offsetPosition[0]}px top ${offsetPosition[1]}px`, - 'background-image': `radial-gradient(circle at ${3 * scale}px ${3 * scale}px, #C5CDD3 ${3 * scale}px, transparent 1px)`, }; + if (squareSize > 3) { + return { + ...styles, + 'background-image': `radial-gradient(circle at ${dotSize}px ${dotSize}px, #C5CDD3 ${dotSize}px, transparent 1px)`, + }; + } + return styles; }, workflowClasses () { const returnClasses = [];