mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
simplify code
This commit is contained in:
@@ -71,9 +71,7 @@ export function uiPhotoviewer(context) {
|
||||
|
||||
|
||||
function setPhotoFromViewerButton() {
|
||||
services.mapillary.ensureViewerLoaded(context).then(() => {
|
||||
if (!services.mapillary.isViewerOpen()) return;
|
||||
|
||||
if (services.mapillary.isViewerOpen()) {
|
||||
if (context.mode().id !== 'select' || !(layerStatus('mapillary') && getServiceId() === 'mapillary')) {
|
||||
buttonRemove();
|
||||
} else {
|
||||
@@ -103,7 +101,7 @@ export function uiPhotoviewer(context) {
|
||||
const annotation = t('operations.change_tags.annotation');
|
||||
context.perform(action, annotation);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function layerStatus(which) {
|
||||
const layers = context.layers();
|
||||
|
||||
Reference in New Issue
Block a user