Commit e4244809c8deb61693a0983b59c4f1f34355971a

Authored by Edmar Moretti
1 parent 6ac783ce

-

Showing 1 changed file with 16 additions and 1 deletions   Show diff stats
classesjs/classe_interface.js
@@ -1892,7 +1892,13 @@ i3GEO.Interface = { @@ -1892,7 +1892,13 @@ i3GEO.Interface = {
1892 var calcCoord, modoAtual = ""; 1892 var calcCoord, modoAtual = "";
1893 calcCoord = function(e) { 1893 calcCoord = function(e) {
1894 var point, p, lonlat, d, pos, projWGS84, proj900913; 1894 var point, p, lonlat, d, pos, projWGS84, proj900913;
1895 - p = e.xy; 1895 + if(e.xy){
  1896 + p = e.xy;
  1897 + }
  1898 + //se touch
  1899 + if(e.changedTouches){
  1900 + p = new OpenLayers.Pixel(e.changedTouches[0].pageX,e.changedTouches[0].pageY);
  1901 + }
1896 lonlat = i3geoOL.getLonLatFromPixel(p); 1902 lonlat = i3geoOL.getLonLatFromPixel(p);
1897 if (!lonlat) { 1903 if (!lonlat) {
1898 return; 1904 return;
@@ -1981,6 +1987,15 @@ i3GEO.Interface = { @@ -1981,6 +1987,15 @@ i3GEO.Interface = {
1981 } 1987 }
1982 calcCoord(e); 1988 calcCoord(e);
1983 }); 1989 });
  1990 + i3geoOL.events.register(
  1991 + "touchend",
  1992 + i3geoOL,
  1993 + function(e) {
  1994 + if (modoAtual === "move") {
  1995 + return;
  1996 + }
  1997 + calcCoord(e);
  1998 + });
1984 }, 1999 },
1985 /** 2000 /**
1986 * Ativa os botoes da bara de botoes 2001 * Ativa os botoes da bara de botoes