tooltip update

This commit is contained in:
laigyu
2024-04-15 14:54:43 +08:00
parent 2325de4662
commit b1ff86cd29
2 changed files with 20 additions and 1 deletions
+3 -1
View File
@@ -788,7 +788,9 @@ en:
inch: in
max_length_reached: "This string is longer than the maximum length of {maxChars} characters. Anything exceeding that length will be truncated."
set_today: "Sets the value to today."
set_photo_from_viewer: "Store this photo on the currently selected map object"
set_photo_from_viewer:
enable: "Tag this photo id on the currently selected map object"
disable: "This image is already tagged on this feature"
background:
title: Background
description: Background Settings
+17
View File
@@ -211,6 +211,23 @@ export function uiPhotoviewer(context) {
const button = selection.selectAll('.set-photo-from-viewer').data([0]);
button.attr('disabled', disabled ? 'true' : null);
button.classed('disabled', disabled);
button.call(uiTooltip().destroyAny);
if (disabled) {
button.call(uiTooltip()
.title(() => t.append('inspector.set_photo_from_viewer.disable'))
.placement('right')
);
} else {
button.call(uiTooltip()
.title(() => t.append('inspector.set_photo_from_viewer.enable'))
.placement('right')
);
}
button.select('.tooltip')
.classed('dark', true)
.style('width', '300px');
}
}