aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-03-22 17:14:12 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-03-26 15:08:14 +0100
commit925ebbebe7e41a89c80cf0ee93405378cb17d44a (patch)
treec62b2f6796dc7a47059f84eb12fd23b652b5050e /web
parent3b82cc190589cbc712ec35e28efa1dd0af2f0d82 (diff)
Fix issues with new report pin, improve cursor.
The "coerce pin ID to integer" behaviour to fix a previous issue was coercing undefined to NaN, which then caused other problems with the new report pin, such as fading out when hovered, and being the wrong size. Also improve the cursor handling, showing the grab/ grabbing cursors where available.
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/sass/_base.scss10
-rw-r--r--web/js/map-OpenLayers.js2
2 files changed, 11 insertions, 1 deletions
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss
index 4e2a2fd5f..d3e96fb5f 100644
--- a/web/cobrands/sass/_base.scss
+++ b/web/cobrands/sass/_base.scss
@@ -1649,6 +1649,16 @@ html.js #map .noscript {
bottom: 3px !important;
#{$right}: 3px;
}
+.olControlDragFeatureFMSOver {
+ cursor: move;
+ cursor: -webkit-grab;
+ cursor: grab;
+}
+.olControlDragFeatureFMSActive.olControlDragFeatureFMSOver.olDragDown {
+ cursor: move;
+ cursor: -webkit-grabbing;
+ cursor: grabbing;
+}
/* Drag is only present in noscript form. XXX Copy from core. */
#drag {
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index ec4f8bc3d..7d0f9076e 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -126,7 +126,7 @@ $.extend(fixmystreet.utils, {
fixmystreet.map.getProjectionObject()
);
}
- var id = +pin[3];
+ var id = pin[3] === undefined ? pin[3] : +pin[3];
var marker_size = (id === window.selected_problem_id) ? selected_size : size;
var marker = new OpenLayers.Feature.Vector(loc, {
colour: pin[2],