Dad72 Posted June 8, 2017 Share Posted June 8, 2017 When you have an event that opens a modal window, the button has strange behavior. On my scene locally, I open popop modal windows after a click. But after several clicks the button it gradually becomes transparent to become invisible (the text is ok). Then all the other buttons after some clicks gradually become invisible. The button that are in containers (rectangle) do not have this problem. On the PG, I use an alert () and the result is different, the button this resize progressively. I think both are binding problem and changes the button state after a blocking event (alert, prompt, popop modal ...) https://www.babylonjs-playground.com/#U9AC0N#5 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 8, 2017 Share Posted June 8, 2017 This is because the page losts the focus in this case and then the button does not receive the up event I suggest just using pointerUp observable: https://www.babylonjs-playground.com/#U9AC0N#6 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 8, 2017 Author Share Posted June 8, 2017 Yes, it works on PG in the case of alert. But in case of one modal popup, my button becomes transparent progressively has every click. In made it takes the value of the over of the button and has every click, the button reduces its opacity of the value of the over, I do not know why Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 8, 2017 Author Share Posted June 8, 2017 When I look at the value of the button after every click, _alpha lose from 0.1 to 0.1. What can cause it? Inside a rectangle, I do not have this error. Quote {name: "Profil", _alpha: 0.9, _zIndex: 0, _currentMeasure: t, _fontFamily: "Arial"…} {name: "Profil", _alpha: 0.8, _zIndex: 0, _currentMeasure: t, _fontFamily: "Arial"…} To regulate the probleme, I force the value alpha to 1.0 after every click in event this.profil.alpha = 1.0; Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 9, 2017 Author Share Posted June 9, 2017 I did a PR avoiding the alpha of decrement to every click. Because when you open a modal window with jQuery, hover out the event is not triggered, and alpha does not return to its original position. Maybe an event such as "Focus out" (onFocusOutObservable) on alpha to its initial state to correct this problem. But I do not know how. https://github.com/BabylonJS/Babylon.js/pull/2262 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 9, 2017 Share Posted June 9, 2017 After discussing it on GitHub we need a repro on PG Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 9, 2017 Author Share Posted June 9, 2017 Yes PG do not want my link I use jquery.modal.min.js https://www.babylonjs-playground.com/#U9AC0N#12 My server is not with https, If I put https I : Failed to load resource: net::ERR_INSECURE_RESPONSE As I said above, I bypass the problem by putting the APHA has 1.0 in the event. But I'm sure another event such as loss of focus could be added for add alpha of button a 1.0. No need to do a PG for it Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 10, 2017 Share Posted June 10, 2017 Sounds good 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.