[OpenLayers-Trac] [OpenLayers] #3274: Allow click select and hover highlight

OpenLayers trac-20090302 at openlayers.org
Tue Apr 26 07:51:29 EDT 2011


#3274: Allow click select and hover highlight
---------------------------------------+------------------------------------
 Reporter:  mosesonline                |       Owner:  tschaub     
     Type:  feature                    |      Status:  new         
 Priority:  minor                      |   Milestone:  2.12 Release
Component:  Control.SelectFeature      |     Version:  SVN         
 Keywords:  hover,SelectFeature,click  |       State:  Review      
---------------------------------------+------------------------------------
 '''Scenario''': Show popup over features when hover over it and fix
 visible popup when click on the feature.[[BR]]
 '''Problem''': click is not recognized when hover is true.[[BR]]
 '''How to solve''': A new option (in patch) named clickSelect should be
 set to true(default). Use it in click(out)Feature instead of hover.
 Secondary in outFeature only unhighlight when this feature is not
 selected.[[BR]]
 '''Changes on current code''': When selectFeature hover and highlightOnly
 is true then clickSelect should be set to false to prevent features to be
 selected.[[BR]]
 '''Extra''':[[BR]]
 1. The click callbacks should be initialized only when needed, in new code
 when clickSelect is true else if hover is false.
 2. The second change in outFeature. It could be then a check
 "!this.clickSelect ||" should be added, but I don't think so because when
 highlightOnly is activated the only way to select something is when
 this.clickSelect is true.[[BR]]
 3. It think the change impacts old code, but it leads to a better
 separation of concerns because hover and click is separated and the
 functionality is enhanced.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3274>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list