bounds management

This commit is contained in:
vcoppe
2025-10-19 16:14:05 +02:00
parent 117c46341b
commit e57ced0ce7
12 changed files with 258 additions and 182 deletions

View File

@@ -35,15 +35,17 @@ export class FileActionManager {
this._files = new Map();
this._fileSubscriptions = new Map();
this._fileStateCollectionObserver = new GPXFileStateCollectionObserver(
(fileId, fileState) => {
this._fileSubscriptions.set(
fileId,
fileState.subscribe((fileWithStatistics) => {
if (fileWithStatistics) {
this._files.set(fileId, fileWithStatistics.file);
}
})
);
(newFiles) => {
newFiles.forEach((fileState, fileId) => {
this._fileSubscriptions.set(
fileId,
fileState.subscribe((fileWithStatistics) => {
if (fileWithStatistics) {
this._files.set(fileId, fileWithStatistics.file);
}
})
);
});
},
(fileId) => {
let unsubscribe = this._fileSubscriptions.get(fileId);