Skip to content

Commit

Permalink
#1140 fix bug where project intro lightbox wasn't opening automatical…
Browse files Browse the repository at this point in the history
…ly if 1st page loaded was 360 imaage
  • Loading branch information
FayCross committed Sep 8, 2022
1 parent b4f625d commit 4e8da45
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -28,7 +28,8 @@
scenes,
lockedHs,
currentScene,
videoResize = true;
videoResize = true,
firstLoad;

// function called every time the page is viewed after it has initially loaded
this.pageChanged = function() {
Expand Down Expand Up @@ -56,11 +57,10 @@

// function called every time the size of the LO is changed
this.sizeChanged = function() {

// if this has been triggered from window.resize() called manually for video sizing then skip all this
if (videoResize == true) {

if (window.$.featherlight.current() != null) {
if (window.$.featherlight.current() != null && firstLoad != true) {
window.$.featherlight.current().close();
}

Expand Down Expand Up @@ -102,6 +102,7 @@
}

this.begin = function() {
firstLoad = true;
var $mainText = $("#mainText");

var panelWidth = x_currentPageXML.getAttribute('size') == undefined ? 'large' : x_currentPageXML.getAttribute('size');
Expand Down Expand Up @@ -548,6 +549,7 @@
}

this.sizeChanged();
firstLoad = false;
x_pageLoaded();
}

Expand Down

0 comments on commit 4e8da45

Please sign in to comment.