use element title as navigation select option text when available (#803)

This commit is contained in:
hugocvx
2022-01-30 16:06:42 +01:00
committed by GitHub
parent 4bceee7fd2
commit ecbdd43ca8
2 changed files with 5 additions and 1 deletions

View File

@@ -4,6 +4,8 @@ Navigation UI plugin
This plugin provides UI elements "back", "forward" and a list to select
a specific slide number.
Element attribut title is used for select option content if available, it uses element id if no title is provided.
The navigation controls are visible if the toolbar plugin is enabled. To add the toolbar to your
presentations, [see toolbar plugin README](../toolbar/README.md).

View File

@@ -45,7 +45,9 @@
// Omit steps that are listed as hidden from select widget
if ( hideSteps.indexOf( steps[ i ] ) < 0 ) {
options = options + '<option value="' + steps[ i ].id + '">' + // jshint ignore:line
steps[ i ].id + '</option>' + '\n'; // jshint ignore:line
(
steps[ i ].title ? steps[ i ].title : steps[ i ].id
) + '</option>' + '\n';
}
}
return options;