Skip to content

Commit

Permalink
Experimental: Allow to zoom with the scroll wheel over a single popup.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorix committed Dec 12, 2012
1 parent ce70480 commit d4b2fe9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/feature-popups-plus.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// Create control and add some layers
// ----------------------------------
// ** advanced use **

var framedCloudScrolable = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {
displayClass: "olScrollable olPopup"
});
var fpControl = new OpenLayers.Control.FeaturePopups({
boxSelectionOptions: {},
// ** Options for the SelectFeature control to select **
Expand All @@ -10,6 +14,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, but like all drugs can have side effects ;-) **
popupSingleOptions: {popupClass: framedCloudScrolable},
// ** Overwrites html of the list popups adding a vacuum <li> before each item **
popupListOptions: {eventListeners: {
"beforepopupdisplayed": function(e){
Expand Down

4 comments on commit d4b2fe9

@bogdandragomir
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the code here http://test2.trafficguide.ro/ but nothing changed. Please check.
Thank you!

@jorix
Copy link
Owner Author

@jorix jorix commented on d4b2fe9 Dec 16, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bogdandragomir
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Jorix,

I think it is too complicated and risky to use OL dev code.
I am not very skilled with OL and this application has some important usage this winter.
For the moment it is OK as it works from this point of view.
Maybe OL3 will add this as default behaviour.

Thank you!

@jorix
Copy link
Owner Author

@jorix jorix commented on d4b2fe9 Dec 22, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I propose is just use "MouseWheel.js" of dev.

I do not think it's a major risk, so I have reviewed the code and I didn't see any differences which are related to changes in other components.

In the link above you can see that it works correctly even using 2.11

Please sign in to comment.