Skip to content

Commit c517f9f

Browse files
committed
Also store pixel position in state.mousePosition
1 parent baaa7d4 commit c517f9f

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

web/client/components/map/leaflet/Map.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ let LeafletMap = React.createClass({
268268
this.props.onMouseMove({
269269
x: pos.lng,
270270
y: pos.lat,
271-
crs: "EPSG:4326"
271+
crs: "EPSG:4326",
272+
pixel: event.containerPoint
272273
});
273274
},
274275
registerHooks() {

web/client/components/map/openlayers/Map.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ var OpenlayersMap = React.createClass({
151151
this.props.onMouseMove({
152152
y: coords[1],
153153
x: tLng,
154-
crs: "EPSG:4326"
154+
crs: "EPSG:4326",
155+
pixel: {
156+
x: event.pixel[0],
157+
y: event.pixel[1]
158+
}
155159
});
156160
}
157161
});

0 commit comments

Comments
 (0)