Update TldrawApp.ts

This commit is contained in:
Steve Ruiz 2021-11-18 11:39:20 +00:00
parent c965c12532
commit 2398ba80ec

View file

@ -1453,12 +1453,8 @@ export class TldrawApp extends StateManager<TDSnapshot> {
copySvg = (ids = this.selectedIds, pageId = this.currentPageId) => { copySvg = (ids = this.selectedIds, pageId = this.currentPageId) => {
if (ids.length === 0) ids = Object.keys(this.page.shapes) if (ids.length === 0) ids = Object.keys(this.page.shapes)
console.log(ids)
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg') const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
// const idsToCopy = ids.flatMap((id) => TLDR.getDocumentBranch(this.state, id, pageId))
const shapes = ids.map((id) => this.getShape(id, pageId)) const shapes = ids.map((id) => this.getShape(id, pageId))
function getSvgElementForShape(shape: TDShape) { function getSvgElementForShape(shape: TDShape) {