Icon webgl example / avoid doing hit detection when view is moving
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user