1. Zimmervermittlung Grensing UG (haftungsbeschränkt
  2. Sherlock Holmes
  3. General Talk
  4. Tuesday, 07 November 2017
  5.  Subscribe via email
Hello!

I have to trigger a few JS functions after each hotspot is rendered, or each time the hotspots tab is updated and the whole collection has rendered completely after user interaction.

I have to rearrange the content of the custom fields to suit my client's design needs.

I'm really close but I still have issues, because I only manage to get my code executed on the first page load but never on tab update so my design tweaks are lost everytime a user drags the map or searches the database. Could you please assist me?

I understand I have to edit this object for events triggered everytime users interact with the app after the page initially loads. I got to have some code execute there, although the hotspots info panel hadn't finished rendering and my code looks for existing DOM elements so it was still unable to find it.

from hotspots_app.js, I commented where I'm entering code


/**
* Created by DanielDimitrov on 26.02.14.
*/
HotspotsManager.module("HotspotsApp", function(HotspotsApp, HotspotsManager, Backbone, Marionette, $, _){

var API = {
renderHotspotsInTab: function() {
HotspotsApp.Tabs.Controller.render();
},
showList: function(hotspots) {
HotspotsApp.List.Controller.showList(hotspots);
// code written here executes after the list was generated but has not yet finished rendering
},
markerSelected: function(model, isSelected) {
HotspotsApp.List.Controller.selected(model, isSelected);
},
setPage: function(page) {
HotspotsApp.List.Controller.setPage(page);
},
shotTileHotspot: function(hotspot) {
HotspotsApp.List.Controller.shotTileHotspot(hotspot);
}
};

HotspotsManager.on('start:page', function(page) {
API.setPage(page);
});

HotspotsManager.on("tabs:ready", function(){
API.renderHotspotsInTab();
});

this.listenTo(HotspotsManager, "hotspots:fetchedData", function(hotspots) {
// code written here executes right before the list is generated
return API.showList(hotspots);
});
HotspotsManager.on("marker:selected", function(model, isSelected) {
API.markerSelected(model, isSelected);
});

HotspotsManager.on("tile:hotspot:loaded", function(model) {
API.shotTileHotspot(model);
});
});
});
Responses (1)


There are %s replies to this question. If you want to see them you need a valid subscription.
If you have a valid subscription, please login now.
Visit store now

Last questions

Hotspots Pro 6.0.13 compatability with Joomla 5.3.
Running Hotspots Pro 6.0.13 on Joomla 4.4.13 and want to upgrade to Joomla 5.3.1...
2 Replies
Posted on Friday, 04 July 2025
some questions on Hotspots
Hi, On Hotspots extension : 1) is it possible to add our own map layer / v...
0 Replies
Posted on Thursday, 03 July 2025
Trying to resize the image in the comments
Hey everyone, Basically I am trying to make the images in the comments smalle...
9 Replies
Posted on Wednesday, 12 August 2009
J5 compatibility for Hotspots
Hi guys, Just started to update my old J3x website. Is there J5 compatibility p...
2 Replies
Posted on Monday, 24 February 2025
  • #Hotspots
  • #hotspots Joomla 5
error message when adding/cofiguring email address
When configuring the email plugin that send a email message to admin when a new ...
0 Replies
Posted on Friday, 09 May 2025