html - Clicking Google-map beneath the canvas -
this 1 getting tricky me.i have google map in page working ,above lies canvas. need make google map clickable .i.e when click on canvas ,the map should behave .i have added pointer-events:none;
attribute.it works in firefox ,chrome , ie11. requirement need make clickable in ie9 on wards,which unable replicate. how that?
if 1 can replicate behavior in fiddle ,that helpful me.
there's old jquery hack simulates pointer-events:
listen click event on canvas , in click handler:
hide canvas:
$(this).hide();
ask document element @ clicked xy:
var $map=$(document.elementfrompoint(event.clientx,event.clienty);
(adjust clientx/y offset map/canvas elements) if map element under canvas, define $map @ start of app , avoid step.trigger same event on google map:
$map.trigger(event);
redisplay canvas:
$(this).show();
Comments
Post a Comment