[PLUGINS] ~gis v4.41.1 --> v4.43.1
[lhc/web/www.git] / www / plugins / gis / lib / leaflet / plugins / Control.MiniMap.js
index c2b0535..bd59741 100644 (file)
 
                _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;