Icon webgl example / avoid doing hit detection when view is moving

This commit is contained in:
Olivier Guyot
2019-10-31 14:19:39 +01:00
parent 600e1a4647
commit af15cfb815
+2 -2
View File
@@ -59,7 +59,7 @@ const style = {
rotateWithView: false, rotateWithView: false,
offset: [ offset: [
0, 0,
9 0
], ],
textureCoord: [ textureCoord: [
'match', 'match',
@@ -144,7 +144,7 @@ map.addLayer(
const info = document.getElementById('info'); const info = document.getElementById('info');
map.on('pointermove', function(evt) { map.on('pointermove', function(evt) {
if (map.getView().getInteracting()) { if (map.getView().getInteracting() || map.getView().getAnimating()) {
return; return;
} }
const pixel = evt.pixel; const pixel = evt.pixel;