Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a button with onPointerUpObservable need to be pressed two times #76

Open
assiomatica opened this issue May 19, 2021 · 0 comments
Open

Comments

@assiomatica
Copy link

Describe the bug
I have a button:

var button1 = GUI.Button.CreateSimpleButton("but1", "Top");
button1.width = "150px";
button1.height = "40px";
button1.color = "white";
button1.cornerRadius = 20;
button1.background = "green";
button1.top = "10px";
button1.verticalAlignment = 'top';
button1.onPointerUpObservable.add(function () {
console.log("up");
// _this.flyToHome();
_this.camera.restoreState();
_this.camera.update();
});

  advancedTexture.addControl(button1);

the button must reset the camera position but if I need to press for some seconds to see the camera reset.
seems the action (restore the camera) it's interrupted and cannot be completed the first click

Minimally Reproducible Example

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. See error in (location [e.g. JavaScript Console])

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots (optional)
Add any screenshots to help explain your problem, unless the minimally reproducible example is sufficient.

Environment (please complete the following information):

  • Device: [e.g. Desktop or Smartphone]
  • OS: [e.g. Windows]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant