mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-07 06:14:07 +00:00
fixes
This commit is contained in:
@@ -85,7 +85,11 @@ export class SortableFileList {
|
||||
this._unsubscribes.push(
|
||||
engine.selection.subscribe(() => tick().then(() => this.updateFromSelection()))
|
||||
);
|
||||
this._unsubscribes.push(engine.order.subscribe(() => this.updateFromFileOrder()));
|
||||
// after the elements are rendered: sorting a list that does not have the new files yet
|
||||
// would put them at the beginning
|
||||
this._unsubscribes.push(
|
||||
engine.order.subscribe(() => tick().then(() => this.updateFromFileOrder()))
|
||||
);
|
||||
}
|
||||
|
||||
/** The node of a child of the list. */
|
||||
|
||||
@@ -147,8 +147,9 @@ class Engine {
|
||||
return this.run((w) => w.new_file(name));
|
||||
}
|
||||
|
||||
loadFile(data: Uint8Array) {
|
||||
return this.run((w) => w.load_file(data));
|
||||
/** `name` is the name of the file when the data has none (the name on disk, without extension). */
|
||||
loadFile(data: Uint8Array, name: string) {
|
||||
return this.run((w) => w.load_file(data, name));
|
||||
}
|
||||
|
||||
duplicate() {
|
||||
|
||||
Reference in New Issue
Block a user