sahbiouali / webglearth

Automatically exported from code.google.com/p/webglearth
0 stars 1 forks source link

[Easy-fix] Bad MouseWheel event context makes markers disrupt wheel events #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open the WebGL earth Markers.html example
2. Try to scroll-zoom the globe while hovering on a marker
3. Quietly weep.

What is the expected output? What do you see instead?
Markers shouldn't prevent mousewheel zooming.

Please provide any additional information below.
we/ui/mousezoomer.js line 78 
(https://github.com/webglearth/webglearth/blob/master/we/ui/mousezoomer.js#L78)
Event context should be containing div and not canvas because markers in 
overlay divs are disrupting mouse events.

Original issue reported on code.google.com by thibaut....@gmail.com on 30 Nov 2012 at 1:34

GoogleCodeExporter commented 8 years ago
On a side note, adding event callbacks in the JS API would be a good idea.

Like:
    var earth = new WebGLEarth('earth_div', options);
    earth.onZoom(function(zoomLevel){
        // do something
    });

Thanks for reading.

Original comment by thibaut....@gmail.com on 30 Nov 2012 at 1:40