diff options
author | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-04-05 20:03:36 -0400 |
---|---|---|
committer | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-04-05 20:03:36 -0400 |
commit | 4823e1c7ceb0e58cdb515e2bb013632d81767ae3 (patch) | |
tree | cd5bd1398daaf673b57450883566f473cc480997 /src/Utils.ts | |
parent | cb5f0847b098d89a1390acf90579b3c7fbc5ac3e (diff) |
added basic grouping when exiting pen mode
Diffstat (limited to 'src/Utils.ts')
-rw-r--r-- | src/Utils.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Utils.ts b/src/Utils.ts index d0d891f77..6519b5d13 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -407,6 +407,7 @@ export function formatTime(time: number) { return (hours ? hours.toString() + ":" : "") + minutes.toString().padStart(2, '0') + ':' + seconds.toString().padStart(2, '0'); } +// x is furthest left, y is furthest top, r is furthest right, b is furthest bottom export function aggregateBounds(boundsList: { x: number, y: number, width?: number, height?: number }[], xpad: number, ypad: number) { const bounds = boundsList.map(b => ({ x: b.x, y: b.y, r: b.x + (b.width || 0), b: b.y + (b.height || 0) })).reduce((bounds, b) => ({ x: Math.min(b.x, bounds.x), y: Math.min(b.y, bounds.y), |