Hotspots DOM with multiple scenes

Nicat
Posts: 3
Joined: Wed Apr 12, 2017 3:33 pm

Hotspots DOM with multiple scenes

Postby Nicat » Thu Sep 14, 2017 12:08 pm

Hi,
I have 2 scenes, 1 with dom hotspots, other one without. When i changing scene console says "Cannot read property 'onOver' of null" and in scene which is without hotspots they staying. Tryed to hide with css

Code: Select all

  var activeScene = this.viewer.story.scenes.filter(x => x.uid === this.viewer.story.sceneUid)[0];
    console.log(activeScene.config.hotspots);
    activeScene.config.hotspots.forEach(function(eachObj) {
      $('#'+eachObj.dom.id).show();
    });

It works but anyway console spamming errors.
Example pen: https://codepen.io/BayramovNicat/pen/RLNYme
Can you help me with that?

User avatar
aberthet
ForgeJS Team
Posts: 16
Joined: Tue Dec 13, 2016 2:53 pm

Re: Hotspots DOM with multiple scenes

Postby aberthet » Fri Sep 15, 2017 3:43 pm

Hi Nicat,

This is a known issue that we have fixed in the current development branch (see here https://github.com/gopro/forgejs/issues/122)

The fix will be part of the next release, but in the meantime you can build your own up-to-date version of ForgeJS from the github repo.

Cheers

Adrien

Who is online

Users browsing this forum: No registered users and 2 guests