JohnK 991 Report post Posted November 24, 2018 ScrollViewer now available and enhanced by DK 4 1 inteja, Arte, Sebavan and 2 others reacted to this Quote Share this post Link to post Share on other sites
Dad72 916 Report post Posted November 24, 2018 It sounds cool. But the scroll of the mouse does not work for moving the cursor with the wheel. I think this has not been added, do we have the opportunity to add it with observables? Quote Share this post Link to post Share on other sites
JohnK 991 Report post Posted November 25, 2018 No as I never use wheel didn't think of it. Could try onpointerover perhaps. Quote Share this post Link to post Share on other sites
Dad72 916 Report post Posted November 25, 2018 Something like this: canvas.addEventListener("wheel", (evt) => { if(this.slider[name].isVisible == true) { if(evt.deltaY < 0 && this.slider[name].value >= 0) { this.slider[name].value -= 50; } else if(evt.deltaY > 0 && this.slider[name].value < this.slider[name].maximum) { this.slider[name].value += 50; } } }, false); Quote Share this post Link to post Share on other sites
JohnK 991 Report post Posted November 25, 2018 This is a dirty way of doing it https://www.babylonjs-playground.com/#3EF49E#1 will have to do more studying to add "wheel" code into the source code as observables and events are one of my many weak points. Note that for both sliders the range is 0 to 100 from which the amount to scroll the viewer window is then calculated. You can guess the name of the horizontal bar 🙂😎🙂 1 Wingnut reacted to this Quote Share this post Link to post Share on other sites
JohnK 991 Report post Posted November 25, 2018 Will look at that as well. Maybe a week or so before done. Quote Share this post Link to post Share on other sites
Dad72 916 Report post Posted November 25, 2018 No, it's good John, the scrool is not visible if the text is shorter than the container. All is Ok, for me. Quote Share this post Link to post Share on other sites
JohnK 991 Report post Posted November 26, 2018 Please note addWindow will soon be changed to addControl so it matches other controls Done 1 Sebavan reacted to this Quote Share this post Link to post Share on other sites
JohnK 991 Report post Posted December 6, 2018 ScollViewer now enhanced by DK. Docs updated. Quote Share this post Link to post Share on other sites