From 34062cfa7731ab0c0d1df94b931fede0c57f1f09 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Sun, 13 Jun 2021 22:39:18 +0200 Subject: fix group move bug when group contains elements without dimensions, update deps --- src/modules/core/containerGeometry.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/core/containerGeometry.js b/src/modules/core/containerGeometry.js index 50342b8..908bb27 100644 --- a/src/modules/core/containerGeometry.js +++ b/src/modules/core/containerGeometry.js @@ -4,8 +4,18 @@ import { proportionalSize } from '../../utils/utils.js' export function dmove (dx, dy) { this.children().forEach((child, i) => { - // Get the childs bbox - const bbox = child.bbox() + + let bbox + + // We have to wrap this for elements that dont have a bbox + // e.g. title and other descriptive elements + try { + // Get the childs bbox + bbox = child.bbox() + } catch (e) { + return + } + // Get childs matrix const m = new Matrix(child) // Translate childs matrix by amount and -- cgit v1.2.3