From da5eb7a4b6f2c75cca982534755cbcd4854c98ed Mon Sep 17 00:00:00 2001 From: piotrpekala7 <31202938+piotrpekala7@users.noreply.github.com> Date: Tue, 6 Apr 2021 17:44:10 +0200 Subject: [PATCH] Fix for grid issues (with 4k resolution) --- src/app/cartography/components/d3-map/d3-map.component.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/cartography/components/d3-map/d3-map.component.ts b/src/app/cartography/components/d3-map/d3-map.component.ts index 4a30cc36..44960512 100644 --- a/src/app/cartography/components/d3-map/d3-map.component.ts +++ b/src/app/cartography/components/d3-map/d3-map.component.ts @@ -108,7 +108,13 @@ export class D3MapComponent implements OnInit, OnChanges, OnDestroy { if (val) { this.svg.attr('height', window.innerHeight + window.scrollY - 16); } else { - this.svg.attr('height', this.height); + let heightOfProjectWindow = window.innerHeight - 16; + + if (this.height > heightOfProjectWindow) { + this.svg.attr('height', this.height); + } else { + this.svg.attr('height', heightOfProjectWindow); + } } }