fix zoomout issue

This commit is contained in:
Mutasem 2021-10-29 09:26:34 +02:00
parent 196286dd9e
commit 3602b117d1

View file

@ -419,11 +419,19 @@ export default mixins(
backgroundStyle (): object { backgroundStyle (): object {
const scale = this.nodeViewScale; const scale = this.nodeViewScale;
const offsetPosition = this.$store.getters.getNodeViewOffsetPosition; const offsetPosition = this.$store.getters.getNodeViewOffsetPosition;
return { const squareSize = 50 * scale;
'background-size': `${50 * scale}px ${50 * scale}px`, const dotSize = 3 * scale;
const styles: object = {
'background-size': `${squareSize}px ${squareSize}px`,
'background-position': `left ${offsetPosition[0]}px top ${offsetPosition[1]}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 () { workflowClasses () {
const returnClasses = []; const returnClasses = [];