WPIntell

Source evidence

Image has infinitive scroll

iPanorama 360 – Advanced Virtual Tour Builder · support · 2024-06-25T10:53:00+00:00

mixedsentiment
mediumseverity
0.78relevance
3replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

1 / 18 rows with source links

5.6% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

17 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
ecomlux resolved
Hi, I have used the “flat” option for my VR-Stand. Unfortunately, the image has an infinitive scroll. How can I change this so that you can move in the stand but not go over the borders of the image ? For now the image repeats all the time. Thanks in advance for any help! Kind regards, Jeremy Bosquet ECOM LUX The page I need help with: [ log in to see the link] Try this code inside the custom js section. If it will be ok for your case I can add this as a new scene option in next release const plugin = this; const $ = jQuery; let activeScene = null; let containerWidth = plugin.$container.width(); const lockMoving = (event) => { let pos = activeScene.control.getPosition(); let zoom = activeScene.control.getZoom(); const zoomThreshhold = 2; let fix = false; if(zoom > zoomThreshhold) { zoom = zoomThreshhold; fix = true; } if(fix) { activeScene.control.removeEventListener('change', lockMoving); activeScene.control.setZoom(zoom); activeScene.control.addEventListener('change', lockMoving); } const posThreshhold = (activeScene.control.imageSize.width * zoom)/2 - containerWidth/2; fix = false; if(pos.x < -posThreshhold) { pos.x = -posThreshhold; fix = true; } else if(pos.x > posThreshhold) { pos.x = posThreshhold; fix = true; } if(fix) { activeScene.control.removeEventListener('change', lockMoving); activeScene.control.setPosition(pos.x, pos.y); activeScene.control.addEventListener('change', lockMoving); } } plugin.$container.on('ipanorama:scene-before-load', (e, data) => { if(activeScene && activeScene.cfg.type == 'flat') { activeScene.control.removeEventListener('change', lockMoving); } activeScene = data.scene; if(activeScene.cfg.type == 'flat') { activeScene.control.addEventListener('change', lockMoving); } }); $(window).on('resize', () => { containerWidth = plugin.$container.width(); }); Hi @avirtum , Thank you so much for this fast support. It indeed resolved my issue! And yes I think this would be great. Kind regards, Jeremy Bosquet I see, I will try to add this option to the engine and UI as soon as possible

Comments

3 shown
Avirtum 2024-06-25T10:56:00+00:00

Try this code inside the custom js section. If it will be ok for your case I can add this as a new scene option in next release const plugin = this; const $ = jQuery; let activeScene = null; let containerWidth = plugin.$container.width(); const lockMoving = (event) => { let pos = activeScene.control.getPosition(); let zoom = activeScene.control.getZoom(); const zoomThreshhold = 2; let fix = false; if(zoom > zoomThreshhold) { zoom = zoomThreshhold; fix = true; } if(fix) { activeScene.control.removeEventListener('change', lockMoving); activeScene.control.setZoom(zoom); activeScene.control.addEventListener('change', lockMoving); } const posThreshhold = (activeScene.control.imageSize.width * zoom)/2 - containerWidth/2; fix = false; if(pos.x < -posThreshhold) { pos.x = -posThreshhold; fix = true; } else if(pos.x > posThreshhold) { pos.x = posThreshhold; fix = true; } if(fix) { activeScene.control.removeEventListener('change', lockMoving); activeScene.control.setPosition(pos.x, pos.y); activeScene.control.addEventListener('change', lockMoving); } } plugin.$container.on('ipanorama:scene-before-load', (e, data) => { if(activeScene && activeScene.cfg.type == 'flat') { activeScene.control.removeEventListener('change', lockMoving); } activeScene = data.scene; if(activeScene.cfg.type == 'flat') { activeScene.control.addEventListener('change', lockMoving); } }); $(window).on('resize', () => { containerWidth = plugin.$container.width(); });

ecomlux 2024-06-25T11:14:00+00:00

Hi @avirtum , Thank you so much for this fast support. It indeed resolved my issue! And yes I think this would be great. Kind regards, Jeremy Bosquet

Avirtum 2024-06-25T11:18:00+00:00

I see, I will try to add this option to the engine and UI as soon as possible