[fix] Remove group shape export backgrounds (#1587)
This PR removes the default SVG export for groups. ### Change Type - [x] `patch` — Bug fix ### Test Plan 1. Create a group 2. Export it to SVG ### Release Notes - Fix image exports for groups
This commit is contained in:
parent
3e2f2e0884
commit
36e8813bf2
1 changed files with 4 additions and 0 deletions
|
@ -6088,6 +6088,9 @@ export class Editor extends EventEmitter<TLEventMap> {
|
||||||
if (id === singleFrameShapeId) return []
|
if (id === singleFrameShapeId) return []
|
||||||
|
|
||||||
const shape = this.getShapeById(id)!
|
const shape = this.getShapeById(id)!
|
||||||
|
|
||||||
|
if (this.isShapeOfType(shape, GroupShapeUtil)) return []
|
||||||
|
|
||||||
const util = this.getShapeUtil(shape)
|
const util = this.getShapeUtil(shape)
|
||||||
|
|
||||||
let font: string | undefined
|
let font: string | undefined
|
||||||
|
@ -6113,6 +6116,7 @@ export class Editor extends EventEmitter<TLEventMap> {
|
||||||
outerElement.appendChild(shapeSvgElement)
|
outerElement.appendChild(shapeSvgElement)
|
||||||
shapeSvgElement = outerElement
|
shapeSvgElement = outerElement
|
||||||
}
|
}
|
||||||
|
|
||||||
if (backgroundSvgElement) {
|
if (backgroundSvgElement) {
|
||||||
const outerElement = document.createElementNS('http://www.w3.org/2000/svg', 'g')
|
const outerElement = document.createElementNS('http://www.w3.org/2000/svg', 'g')
|
||||||
outerElement.appendChild(backgroundSvgElement)
|
outerElement.appendChild(backgroundSvgElement)
|
||||||
|
|
Loading…
Reference in a new issue