Allow custom mousemove conditions

When configuring a Select interaction with a custom condition that
includes mousemove, panning the map will not work any more. This is
because the return value of handleMapBrowserEvent is determined by
checking for a default condition function. By checking for the
underlying event type instead, we gain flexibility with custom condition
functions.
This commit is contained in:
Andreas Hocevar
2014-12-15 11:19:22 +01:00
parent aafe698285
commit 9b0b1543e0

View File

@@ -179,7 +179,7 @@ ol.interaction.Select.prototype.handleMapBrowserEvent =
}
features.extend(selected);
}
return this.condition_ == ol.events.condition.mouseMove;
return ol.events.condition.mouseMove(mapBrowserEvent);
};