JohnK Posted November 24, 2018 Share Posted November 24, 2018 ScrollViewer now available and enhanced by DK Arte, inteja, Sebavan and 2 others 4 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 24, 2018 Share 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 Link to comment Share on other sites More sharing options...
JohnK Posted November 25, 2018 Author Share Posted November 25, 2018 No as I never use wheel didn't think of it. Could try onpointerover perhaps. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 25, 2018 Share 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 Link to comment Share on other sites More sharing options...
JohnK Posted November 25, 2018 Author Share 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 ??? Wingnut 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted November 25, 2018 Author Share Posted November 25, 2018 Will look at that as well. Maybe a week or so before done. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 25, 2018 Share 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 Link to comment Share on other sites More sharing options...
JohnK Posted November 26, 2018 Author Share Posted November 26, 2018 Please note addWindow will soon be changed to addControl so it matches other controls Done Sebavan 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted December 6, 2018 Author Share Posted December 6, 2018 ScollViewer now enhanced by DK. Docs updated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.