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

UI: AFrameActionController Issues #92

Open
KaiHaman opened this issue Jul 18, 2019 · 5 comments
Open

UI: AFrameActionController Issues #92

KaiHaman opened this issue Jul 18, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@KaiHaman
Copy link

Everything works fine with the normal ActionController. However using the AFrameActionController, only MouseHovering seems to work.
I need to catch an 'actionController.actions.keyboard.key[somekey].down' event.

Error persist on normal page: http://localhost:8082/ui/index.php?setup=web_a-frame/City%20bank&model=City%20bank%20aframe&aframe=true

AframeActionController.js:386 Uncaught TypeError: Cannot read property 'up' of undefined
at upAction (AframeActionController.js:386)
at HTMLElement. (AframeActionController.js:102)
at HTMLElement. (a-node.js:263)
at i.twoWayEmit (cursor.js:389)
at i.onCursorUp (cursor.js:246)
at HTMLCanvasElement. (bind.js:12)

All logging enabled in e.g. the city bank.js setup. (Testing this in the existing environment which should work). The "Cannot read property 'up' of undefined" Error message is the only one appearing. The Action events as known are not called.

@naraesk
Copy link
Member

naraesk commented Jul 18, 2019

Clicking on a building should select it (red color) and diaplay the corresponding source code in the CodeViewer on the right side. This should work in the default AFrame City visualization. And it works here, tried with Firefox and Chrome. I don't get this error message. Have you changed anything?

But we had similiar issues with key events in the past. They are usally caused by different browser behaviour. Which browser do you use? Might be worth a try to test it on a different browser, e.g., Firefox or Chrome.

@naraesk naraesk added this to To Do in User Interface via automation Jul 18, 2019
@naraesk naraesk added the bug Something isn't working label Jul 18, 2019
@KaiHaman
Copy link
Author

That is working fine on OSX Chrome and Safari. However the Mouse Hovering and Mouse Up are the only events the AFrameActionController recognizes.

@naraesk
Copy link
Member

naraesk commented Jul 18, 2019

I see. On line 94 onwards we add event listeners to AFrame. You can verify, but they should all be created. When they are not executed, this is either an AFrame problem or we listen to the wrong event. When looking at the naming conventions, it appears that the event might be keydown instead of onkeydown

@KaiHaman
Copy link
Author

In line 40 you do not create action objects for keyboard events as you do in line 28 for mouse events.

@naraesk
Copy link
Member

naraesk commented Jul 18, 2019

Indeed, I guess you'll have to add that. Currently, we don't use any key events in AFrame, only mouse evnets. So the implementation might be incomplete.

@naraesk naraesk added enhancement New feature or request and removed bug Something isn't working labels Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
User Interface
  
To Do
Development

No branches or pull requests

2 participants