update dot grid

This commit is contained in:
Mutasem 2021-10-29 17:00:31 +02:00
parent 36c9f7ab5b
commit b9831428f4

View file

@ -419,16 +419,17 @@ 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;
const squareSize = 50 * scale; const squareSize = 20 * scale;
const dotSize = 3 * scale; const dotSize = 1 * scale;
const dotPosition = 10 * scale;
const styles: object = { const styles: object = {
'background-size': `${squareSize}px ${squareSize}px`, '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`,
}; };
if (squareSize > 3) { if (squareSize > 10) {
return { return {
...styles, ...styles,
'background-image': `radial-gradient(circle at ${dotSize}px ${dotSize}px, #C5CDD3 ${dotSize}px, transparent 1px)`, 'background-image': `radial-gradient(circle at ${dotPosition}px ${dotPosition}px, #D4DADE ${dotSize}px, transparent 0)`,
}; };
} }
return styles; return styles;