diff --git a/plugins/draw-resonators.user.js b/plugins/draw-resonators.user.js index 049a6991..2fd6b385 100644 --- a/plugins/draw-resonators.user.js +++ b/plugins/draw-resonators.user.js @@ -58,6 +58,8 @@ window.plugin.drawResonators.Render = function(options) { this.handleResonatorEntitiesAfterZoom = this.handleResonatorEntitiesAfterZoom.bind(this); this.handleEnableZoomLevelChange = this.handleEnableZoomLevelChange.bind(this); this.portalSelectionChange = this.portalSelectionChange.bind(this); + this.changeStyler = this.changeStyler.bind(this); + this.getStylersList = this.getStylersList.bind(this); }; window.plugin.drawResonators.Render.prototype.registerHook = function() { @@ -238,7 +240,7 @@ window.plugin.drawResonators.Render.prototype.getStylersList = function() { } window.plugin.drawResonators.Render.prototype.getStyler = function() { - var stylerName = this.useStyler in this.stylers ? this.useStyler : 'default'; + var stylerName = this.useStyler in this.stylers ? this.useStyler : 'Default'; return this.stylers[stylerName]; } @@ -271,7 +273,7 @@ window.plugin.drawResonators.Render.prototype.isResonatorsShowBeforeZoom = funct window.plugin.drawResonators.Styler = function(options) { options = options || {}; - this.name = options['name'] || 'default'; + this.name = options['name'] || 'Default'; this.otherOptions = options['otherOptions']; this.getResonatorStyle = options['resonatorStyleFunc'] || this.defaultResonatorStyle; this.getConnectorStyle = options['connectorStyleFunc'] || this.defaultConnectorStyle; @@ -401,8 +403,8 @@ window.plugin.drawResonators.Dialog.prototype.addLink = function() { $('#toolbox').append('Resonators '); } -window.plugin.drawResonators.Dialog.prototype.addEntry = function(dialogEntry) { - this._dialogEntries[dialogEntry.name] = dialogEntry; +window.plugin.drawResonators.Dialog.prototype.addEntry = function(name, dialogEntry) { + this._dialogEntries[name] = dialogEntry; } @@ -422,7 +424,9 @@ window.plugin.drawResonators.Dialog.prototype.show = function() { window.plugin.drawResonators.Dialog.prototype.getDialogHTML = function() { var html = '
' for(var name in this._dialogEntries) { - html += this._dialogEntries[name].getHTML(); + html += '
' + + this._dialogEntries[name].getHTML() + + '
'; } html += '
'; return html; @@ -451,12 +455,13 @@ window.plugin.drawResonators.ListDialogEntry.prototype.getHTML = function() { + '' + '