aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-14 11:59:48 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-14 11:59:48 +1300
commit1cd928bbb8437cd02204cb0e951a03033543822a (patch)
tree8a8d086583e4bcde532d423fae3c1c78dee52de8
parent772c093353e6d5e1d41b0bc3e6a0501a400c7202 (diff)
downloadtrackermap-server-1cd928bbb8437cd02204cb0e951a03033543822a.tar.gz
trackermap-server-1cd928bbb8437cd02204cb0e951a03033543822a.tar.bz2
trackermap-server-1cd928bbb8437cd02204cb0e951a03033543822a.zip
Show hand when hover on marker
-rw-r--r--web/app/view/Map.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/web/app/view/Map.js b/web/app/view/Map.js
index 849f678a7..3be450cf4 100644
--- a/web/app/view/Map.js
+++ b/web/app/view/Map.js
@@ -41,7 +41,7 @@ Ext.define('Traccar.view.Map', {
listeners: {
afterrender: function () {
- var user, server, layer, type, bingKey, vectorLayer, lat, lon, zoom;
+ var user, server, layer, type, bingKey, vectorLayer, lat, lon, zoom, target;
user = Traccar.app.getUser();
server = Traccar.app.getServer();
@@ -99,6 +99,22 @@ Ext.define('Traccar.view.Map', {
view: this.mapView
});
+ target = this.map.getTarget();
+ if (typeof target === 'string') {
+ target = Ext.get(target).dom;
+ }
+
+ this.map.on('pointermove', function (e) {
+ var hit = this.forEachFeatureAtPixel(e.pixel, function(feature, layer) {
+ return true;
+ });
+ if (hit) {
+ target.style.cursor = 'pointer';
+ } else {
+ target.style.cursor = '';
+ }
+ });
+
this.map.on('click', function (e) {
this.map.forEachFeatureAtPixel(e.pixel, function (feature, layer) {
this.fireEvent('selectFeature', feature);