From d13c202ac02e29e1b677ad68613a2f316e7cf5de Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 16 Jul 2024 22:10:08 +0200 Subject: [PATCH] update "add mapillary tag" button state when tags of the feature change addresses https://github.com/openstreetmap/iD/pull/10046#pullrequestreview-2176313208 --- modules/ui/photoviewer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ui/photoviewer.js b/modules/ui/photoviewer.js index 70340d2af..71cbf2da1 100644 --- a/modules/ui/photoviewer.js +++ b/modules/ui/photoviewer.js @@ -64,10 +64,13 @@ export function uiPhotoviewer(context) { buildResizeListener(selection, 'resize', dispatch, { resizeOnY: true }) ); - // set_photo_from_viewer button + // update sett_photo_from_viewer button on selection change and when tags change context.features().on('change.setPhotoFromViewer', function() { setPhotoFromViewerButton(); }); + context.history().on('change.setPhotoFromViewer', function() { + setPhotoFromViewerButton(); + }); function setPhotoFromViewerButton() {