We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bde16f commit 758a243Copy full SHA for 758a243
1 file changed
src/graph-builder/graph-core/5-load-save.js
@@ -126,6 +126,26 @@ class GraphLoadSave extends GraphUndoRedo {
126
}
127
128
129
+ async saveWithoutFileHandle() {
130
+ const str = graphmlBuilder(this.jsonifyGraph());
131
+ const bytes = new TextEncoder().encode(str);
132
+ const blob = new Blob([bytes], { type: 'application/json;charset=utf-8' });
133
+ const options = {
134
+ types: [
135
+ {
136
+ description: 'GraphMl Files',
137
+ accept: {
138
+ 'text/graphml': ['.graphml'],
139
+ },
140
141
+ ],
142
+ };
143
+ const handle = await window.showSaveFilePicker(options);
144
+ const stream = await handle.createWritable();
145
+ await stream.write(blob);
146
+ await stream.close();
147
+ }
148
+
149
saveToFolder() {
150
const str = graphmlBuilder(this.jsonifyGraph());
151
return str;
0 commit comments