Issue with reinitializing 360 full screen.

michaelb

New member
Running into a bug where I can load up a page with the 360 initializing on load and toggle the full screen without any issues, but once I destroy the loader and try to initialize a new instance, the full screen no longer works. After a couple clicks on the button that initializes full screen, the popup close button appears but nothing happens.

This error appears when trying to close the popup that appears with no content: Screen Shot 2019-01-14 at 11.53.04 AM.png.

Upon further testing, it seems that the bug only occurs when the full screen is activated, the instance is destroyed and reinitialized.

Here is a link to an example of this occurring: [link removed]
Click on the 360 full screen > close full screen > Click an alternate tire image > click 360 button to reinitialize rotator > click full screen button again ( it make take 2 clicks to see error, which could just be a binding issue ).
 

WebSupport

Active member
Hi Michael, the issue was likely due to this code on the page you linked:

Code:
viewer.settings.apiReadyCallback = function(api) {
	self.api = api;
};

The same callback is also called when the viewer enters full-screen as it's a different API instance in full-screen (i.e different 360 product view). So the callback has an additional parameter isFullscreen which you would need to consider and not override your existing api instance for the regular view:

Code:
viewer.settings.apiReadyCallback = function(api, isFullscreen) {
if (!isFullscreen)
	self.api = api;
};
 
Top