diff --git a/frontend-js/src/main/js/map/window/ReactionInfoWindow.js b/frontend-js/src/main/js/map/window/ReactionInfoWindow.js index 273ae0e26f023b3c96b5d8dad26c662107787de0..346eab845dee4bb6f9f726351f9a8177f31b08b1 100644 --- a/frontend-js/src/main/js/map/window/ReactionInfoWindow.js +++ b/frontend-js/src/main/js/map/window/ReactionInfoWindow.js @@ -19,16 +19,23 @@ function ReactionInfoWindow(params) { // call super constructor AbstractInfoWindow.call(this, params); - this.setReactionData(params.reaction); + var self = this; + + self.setReactionData(params.reaction); - var reaction = this.getReactionData(); + var reaction = self.getReactionData(); var point = reaction.getCenter(); - var latLng = this.getCustomMap().fromPointToLatLng(point); + var latLng = self.getCustomMap().fromPointToLatLng(point); this.googleInfowindow = new google.maps.InfoWindow({ content: this.content, position: latLng }); - this.googleInfowindow.open(this.getCustomMap().getGoogleMap(), this.getGoogleMarker()); + if (params.reaction.getKineticLaw()!==undefined) { + self.addListener("onShow", function () { + return MathJax.Hub.Queue(["Typeset",MathJax.Hub]); + }); + } + self.googleInfowindow.open(self.getCustomMap().getGoogleMap(), self.getGoogleMarker()); } ReactionInfoWindow.prototype = Object.create(AbstractInfoWindow.prototype);