_addToggleButton: function () {
this._toggleDisplayButton = this.options.toggleDisplay ? this._createButton(
- '', this.options.strings.hideText, ('leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-' +
+ '', this._toggleButtonInitialTitleText(), ('leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-' +
this.options.position), this._container, this._toggleDisplayButtonClicked, this) : undefined;
this._toggleDisplayButton.style.width = this.options.collapsedWidth + 'px';
this._toggleDisplayButton.style.height = this.options.collapsedHeight + 'px';
},
+ _toggleButtonInitialTitleText: function () {
+ if (this.options.minimized) {
+ return this.options.strings.showText;
+ } else {
+ return this.options.strings.hideText;
+ }
+ },
+
_createButton: function (html, title, className, container, fn, context) {
var link = L.DomUtil.create('a', className, container);
link.innerHTML = html;