update "add mapillary tag" button state when tags of the feature change

addresses https://github.com/openstreetmap/iD/pull/10046#pullrequestreview-2176313208
This commit is contained in:
Martin Raifer
2024-07-16 22:10:08 +02:00
parent daf2c9879b
commit d13c202ac0

View File

@@ -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() {