playsign / fidemo

FIWARE Demo / Integration project
Other
16 stars 6 forks source link

input clicks / touches to some of the 2d gui elements go to the 3d scene #10

Closed antont closed 9 years ago

antont commented 9 years ago

interestingly enough with some 2d elements it works correctly. with others it goes to do the raycast to 3d scene which opens the lollipop menu and moves the av.

these seem to 'eat' the events fine, don't let thru to 3d:

these let it thru, have the bug:

AFAIK the situation is that we know a fix: just do the standard browser event bubbling cancel biz in the event handlers. the currently working ones perhaps do it.

Also, it might work to just change the mouse input listener in the POI/sensor vis output blueprint thing where @tapanij put it to hook to the right DOM element (the canvas with the webgl view i guess), and not to the whole document (supposing it does that now).

Another way is to use WebTundra dev2's InputAPI (by Adminotech) but it reportedly doesn't currently work to get mouse input here. It did work earlier.

@Stinkfist0 worked on this earlier and has discussed with @jonnenauha too but I don't know what the status / plan is -- basically just noting here again so that folks know that it's a known issue and that can perhaps track when it gets fixed. If someone works on this, please do assign to self.

Or if you need e.g. me to look into this, do tell.

Belsepubi commented 9 years ago

There is a way to tell which UI div is the closes to prevent e.g. click go through the whole thing. Here is an example how I disabled the lollipop menu to open when heatmapContainerWrapper was not the closes div clicked:

console.log(event.target); if ($(event.target).closest('#heatmapContainerWrapper').length > 0) { self.lollipopMenu.onMouseDown(self.mouse.x, self.mouse.y); }

Script creator knows which div should be clicked when desired behaviour is wanted so with this piece of script the behaviour can be aimed to the right div elements.

jonnenauha commented 9 years ago

Fixed in https://github.com/playsign/fidemo/commit/82461847b96ad226f5548a86e290be55b7c18bfd

antont commented 9 years ago

Are you sure this is all correct?

I'm unable to open Ludo's pins in master. Also clicking Admino's 'CB Test' button doesn't do anything (I'm not sure if it ever worked in standalone, though, but Ludo's pins did).

Oh I think the CB one doesn't work due to filab outage so is not related ("Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://orion.lab.fi-ware.org:1026/ngsi10/queryContext?limit=1000'.)

But what about Ludo's buttons?

Stinkfist0 commented 9 years ago

@antont Seems to work fine. Now that the vehicles are back in business there's actually some functionality to see it work. :)

antont commented 9 years ago

i actually meant ludo's "poi" pins with the issues and cafes etc

Stinkfist0 commented 9 years ago

@antont I can click the screwdriver & wrench icon at least and get an info dialog.

antont commented 9 years ago

ok thanks for info - wrench works for me too, was testing with cafe's or something earlier but perhaps those didn't work yet to begin with.