Skip to content

Commit

Permalink
Allow pan or zoom the map when the mouse is in popup active area.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorix committed Dec 30, 2012
1 parent 413ca11 commit 7772754
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/feature-popups-plus.js
Expand Up @@ -3,7 +3,10 @@
// ** advanced use **

var framedCloudScrollable = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {
displayClass: "olScrollable olPopup"
displayClass: "olScrollable olPopup",
registerEvents:function() {
this.events = new OpenLayers.Events(this);
}
});
var singleEventListeners = {
"beforepopupdisplayed": function(e) {
Expand All @@ -25,7 +28,8 @@ var fpControl = new OpenLayers.Control.FeaturePopups({
// ** Don't use close box on popups
mode: OpenLayers.Control.FeaturePopups.DEFAULT &
~OpenLayers.Control.FeaturePopups.CLOSE_BOX,
// ** Allow to zoom with the scroll wheel when the mouse is in the single popup active area (see `framedCloudScrollable`)
// ** Allow pan or zoom the map and to zoom with the scroll wheel when the
// mouse is in popup active area (see `framedCloudScrollable`)
// ** Alert instead of popup on `poisLayer` (see `singleEventListeners`)
popupSingleOptions: {
popupClass: framedCloudScrollable,
Expand Down

0 comments on commit 7772754

Please sign in to comment.