1

I embed model 3D on my website, i want to temporarily disable scrolling only when cursor is inside of div with model 3D, because when i make zoom in or out model in this same time im moving on webpage. Do you have any idea how to do it?

<div class="3DBoxView" style="width: 80%; height: 465px;">
    <babylon>
        <model url="./External Source/Parts/GLB/<?php echo $partDetails['glb_file'];?>">
    </babylon>
</div>
Jesse
  • 1,386
  • 3
  • 9
  • 23
Dashiphone
  • 59
  • 1
  • 9
  • You could use the `mouseover` and `mouseout` events on your div to add/remove the CSS attribute `overflow: hidden` to/from the element you want to prevent scrolling. – Jesse Feb 03 '20 at 14:38
  • How to disable scrolling temporarily? https://stackoverflow.com/questions/4770025/how-to-disable-scrolling-temporarily – Hamboy75 Feb 03 '20 at 14:38
  • @Jesse i though the same idea but you cant use that because the scroll will appear and disappear and it will looks strange and items will move in screen. – Hamboy75 Feb 03 '20 at 14:39
  • Then check out the link posted by hamboy75. Setting the overflow attribute is how most websites disable scrolling. – Jesse Feb 03 '20 at 14:40

0 Answers0