Copy ID(s) on multiple selection

Copy ID(s) on multiple selection
This commit is contained in:
Alezia Kurdis 2024-03-12 21:36:45 -04:00 committed by GitHub
parent e29549e711
commit 7c8044d27b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -496,12 +496,15 @@ SelectionManager = (function() {
that.createApp.deleteSelectedEntities(); that.createApp.deleteSelectedEntities();
}; };
that.copyIdFromSelectedEntity = function() { that.copyIdsFromSelectedEntities = function() {
if (that.selections.length !== 1) { if (that.selections.length === 0) {
audioFeedback.rejection(); audioFeedback.rejection();
} else { } else if (that.selections.length === 1) {
Window.copyToClipboard(that.selections[0]); Window.copyToClipboard(that.selections[0]);
audioFeedback.confirmation(); audioFeedback.confirmation();
} else {
Window.copyToClipboard(JSON.stringify(that.selections));
audioFeedback.confirmation();
} }
}; };