(schema?: RootSchema)
| 139 | |
| 140 | @action |
| 141 | createDocument(schema?: RootSchema) { |
| 142 | const doc = new Document(this, schema) |
| 143 | this.documents.push(doc) |
| 144 | this.documentsMap.set(doc.id, doc) |
| 145 | |
| 146 | this.designer.postEvent(DOCUMENT_EVENT.ADD, doc) |
| 147 | return doc |
| 148 | } |
| 149 | |
| 150 | @action |
| 151 | removeDocument(idOrDoc: string | Document) { |