Commit a8999558 authored by lerma artemix's avatar lerma artemix
Browse files

Fixes bug in Safari and Chrome as event object has not the same structure than...

Fixes bug in Safari and Chrome as event object has not the same structure than Firefox's one. Test has been removed, result seemed identical without it
parent 44f016e6
......@@ -249,7 +249,9 @@ $(document).ready(function() {
// displays value at clicked pixel on canvas
viewer.addClickEvent((event)=>{
// do request if click is in canvas ( not in left menu ) and no interaction enabled
if(event.originalEvent.originalTarget.tagName === "CANVAS" && !viewer.hasCurrentInteraction()){
console.log("### event");
console.log(event);
if(/*event.originalEvent.originalTarget.tagName === "CANVAS" && */ !viewer.hasCurrentInteraction()){
let request = '';
if(FITS_HEADER.naxis == 2){
request = `getPixelValueAtiRAiDEC?relFITSFilePath=${dataPaths.relFITSFilePath}&iRA=${Math.round(event.coordinate[0])}&iDEC=${Math.round(event.coordinate[1])}`;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment