documentatie
This commit is contained in:
@@ -12,6 +12,7 @@ export class CmapTransferController {
|
||||
});
|
||||
}
|
||||
|
||||
/** Save pending changes, then create the requested readable Markdown export. */
|
||||
async exportMarkdown(options) {
|
||||
const map = this.getCurrentMap();
|
||||
if (!map) throw new Error(this.translate("cmap-export-unavailable", "CMap export is unavailable."));
|
||||
@@ -19,6 +20,7 @@ export class CmapTransferController {
|
||||
return this.markdownExporter.export(map, options);
|
||||
}
|
||||
|
||||
/** Save pending changes, then create the requested portable JSON bundle. */
|
||||
async exportJson(depth) {
|
||||
const map = this.getCurrentMap();
|
||||
if (!map) throw new Error(this.translate("cmap-json-unavailable", "CMap JSON export is unavailable."));
|
||||
@@ -26,6 +28,11 @@ export class CmapTransferController {
|
||||
return this.jsonExporter.export(map, depth);
|
||||
}
|
||||
|
||||
/**
|
||||
* goal : Import a validated CMap bundle after presenting replacement conflicts.
|
||||
* post : Page and CMap catalogues are refreshed and navigation opens the imported root CMap.
|
||||
* result : The importer summary.
|
||||
*/
|
||||
async importFile(file) {
|
||||
const bundle = await this.jsonImporter.read(file);
|
||||
await this.saveBeforeTransfer();
|
||||
|
||||
Reference in New Issue
Block a user