Dear WebRotate Support,
I am currently implementing a 360 product viewer project on a website using the official Wordpress plugin.
I seem to get almost everything working using the shortcode (see below).
However, I have noticed the following behavior:
The website has multiple pages (placed in separate <article> elements) per HTML page, and is using JavaScript to initially show only the first page and hide the other pages.
When I place the 360 product viewer on a page that is initially hidden (display: none, the 360 product viewer uses a certain default width/height set to 100x100px. This means the 360 product viewer is not correctly resizing after I show the correct page layer (setting the <article> element to "display: block;").
I have discovered that this behavior is fixed when resizing the browser window, in other words: when the resize handler is fired. Or when the 360 product viewer is finished loading when the page is visible.
See [...edited out - work in progress...]
(click the grey/white arrow button to navigate to the next page, where the 360 product viewer has been placed)
PS I have used the following shortcode:
I have defined the default width to "100%" and height to "450px" in the plugin settings.
The same behavior occurs when using these values in the shortcode.
My question:
Is it possible to fire a certain handler in my JavaScript code to resize the 360 product viewer(s) on the visible page?
I am currently implementing a 360 product viewer project on a website using the official Wordpress plugin.
I seem to get almost everything working using the shortcode (see below).
However, I have noticed the following behavior:
The website has multiple pages (placed in separate <article> elements) per HTML page, and is using JavaScript to initially show only the first page and hide the other pages.
When I place the 360 product viewer on a page that is initially hidden (display: none, the 360 product viewer uses a certain default width/height set to 100x100px. This means the 360 product viewer is not correctly resizing after I show the correct page layer (setting the <article> element to "display: block;").
I have discovered that this behavior is fixed when resizing the browser window, in other words: when the resize handler is fired. Or when the 360 product viewer is finished loading when the page is visible.
See [...edited out - work in progress...]
(click the grey/white arrow button to navigate to the next page, where the 360 product viewer has been placed)
PS I have used the following shortcode:
Code:
[wr360embed name="NewProject1" config="/wp-content/uploads/webrotate-360-viewer/NewProject1/NewProject1.xml"]
The same behavior occurs when using these values in the shortcode.
My question:
Is it possible to fire a certain handler in my JavaScript code to resize the 360 product viewer(s) on the visible page?