kopia lustrzana https://github.com/OpenDroneMap/WebODM
Add stored flag for addAnnotation
rodzic
1ba5e84d23
commit
cc1e8a6248
|
@ -865,22 +865,24 @@ _('Example:'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleAddAnnotation = (layer, name, task) => {
|
handleAddAnnotation = (layer, name, task, stored) => {
|
||||||
const zIndexGroup = this.zIndexGroupMap[task.id] || 1;
|
const zIndexGroup = this.zIndexGroupMap[task.id] || 1;
|
||||||
|
|
||||||
const meta = {
|
const meta = {
|
||||||
name: name || "",
|
name: name || "",
|
||||||
icon: "fa fa-sticky-note fa-fw",
|
icon: "fa fa-sticky-note fa-fw",
|
||||||
zIndexGroup,
|
zIndexGroup
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.taskCount > 1 && task){
|
if (this.taskCount > 1 && task){
|
||||||
meta.group = {id: task.id, name: task.name};
|
meta.group = {id: task.id, name: task.name};
|
||||||
|
|
||||||
// Only show annotations for the first task
|
if (stored){
|
||||||
let maxZIndex = Math.max(...Object.values(this.zIndexGroupMap)) || 1;
|
// Only show annotations for the first task
|
||||||
if (zIndexGroup !== maxZIndex){
|
let maxZIndex = Math.max(...Object.values(this.zIndexGroupMap)) || 1;
|
||||||
PluginsAPI.Map.toggleAnnotation(layer, false);
|
if (zIndexGroup !== maxZIndex){
|
||||||
|
PluginsAPI.Map.toggleAnnotation(layer, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
layer[Symbol.for("meta")] = meta;
|
layer[Symbol.for("meta")] = meta;
|
||||||
|
|
Ładowanie…
Reference in New Issue