Closed bdrichards closed 6 years ago
As a follow-up, The following seems to function as expected: selectshun.toggleButton.element.attributes.title.value = 'Toggle selection: keybd = q';
This plugin uses the standard Openseadragon way of dealing with strings and translations but I can't remember how it works. I do know that you have to define 'Tooltips.SelectionToggle': 'Toggle Selection: keybd = q'
somewhere (probably in the main OSD object instead of the plugin).
There may be more info in the OSD docs.
From the example code, there you go: https://github.com/picturae/openseadragonselection/blob/2afe50e7c252b8990ea012c942781e17a1625861/javascripts/main.js#L4
Is it possible to change the Toggle Button's tooltip with something like the following? Seems like it should work, but setting the tooltip does not seem to override the source definition of the tooltip:
selectshun =viewer.selection({ keyboardShortcut: 'q', onSelection: function(rect) {....}, }); selectshun.toggleButton.tooltip = "Toggle Selection: keybd = q";