Skip to content

Commit

Permalink
adapt threelayer events when threelayer addto groupgllayer (#2021)
Browse files Browse the repository at this point in the history
* adapt threelayer events when threelayer addto groupgllayer

* update
  • Loading branch information
deyihu authored Jul 15, 2023
1 parent 2497644 commit 0746bb5
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/map/handler/Map.GeometryEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,22 +272,23 @@ class MapGeometryEventsHandler extends Handler {
'includeInternals': true,
//return only one geometry on top,
'filter': geometry => {
if (!(geometry instanceof Geometry)) {
return false;
}
const eventToFire = geometry._getEventTypeToFire(domEvent);
if (eventType === 'mousemove') {
if (!geometryCursorStyle && geometry.options['cursor']) {
geometryCursorStyle = geometry.options['cursor'];
}
if (!geometry.listens('mousemove') && !geometry.listens('mouseover') && !geometry.listens('mouseenter')) {
if (geometry instanceof Geometry) {
const eventToFire = geometry._getEventTypeToFire(domEvent);
if (eventType === 'mousemove') {
if (!geometryCursorStyle && geometry.options['cursor']) {
geometryCursorStyle = geometry.options['cursor'];
}
if (!geometry.listens('mousemove') && !geometry.listens('mouseover') && !geometry.listens('mouseenter')) {
return false;
}
} else if (!geometry.listens(eventToFire) && !geometry.listens(oneMoreEvent)) {
return false;
}
} else if (!geometry.listens(eventToFire) && !geometry.listens(oneMoreEvent)) {
return false;
return true;
} else if (isGeo(geometry)) {
return true;
}

return true;
return false;
},
'count': 1,
'onlyVisible': map.options['onlyVisibleGeometryEvents'],
Expand Down

0 comments on commit 0746bb5

Please sign in to comment.