Skip to content

Commit 7816c49

Browse files
Fix #19267 - Fix SVG dimensions reset to 0 (#19792)
* Fix SVG dimensions reset to 0 Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com> * Fallback to original svg dimensions Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com> --------- Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com>
1 parent 02f6395 commit 7816c49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎resources/js/table/gis_visualization.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ class SvgVisualization extends GisVisualization {
183183
* Resizes the GIS visualization to fit into the space available.
184184
*/
185185
private resize () {
186-
const visWidth = Math.ceil($(this.target).width());
187-
const visHeight = Math.ceil($(this.target).height());
186+
const visWidth = Math.ceil($(this.target).width() || $(this.svgEl).width());
187+
const visHeight = Math.ceil($(this.target).height() || $(this.svgEl).height());
188188

189189
this.x += (visWidth - this.width) / 2;
190190
this.y += (visHeight - this.height) / 2;

0 commit comments

Comments
 (0)