[OpenLayers-Trac] Re: [OpenLayers] #3034: DragControl - featureover and featureout events

OpenLayers trac-20090302 at openlayers.org
Thu Feb 3 01:09:50 EST 2011

#3034: DragControl - featureover and featureout events
 Reporter:  adube                |       Owner:  tschaub        
     Type:  feature              |      Status:  new            
 Priority:  minor                |   Milestone:  2.11 Release   
Component:  Control.DragFeature  |     Version:  SVN            
 Keywords:                       |       State:  Needs More Work
Changes (by erilem):

  * state:  Review => Needs More Work


 I'm not a big fan of introducing {{{featureover}}} and {{{featureout}}}
 events at the {{{DragFeature}}} level. In our current design events are
 triggered by {{{Layer.Vector}}}, I think we want to keep that. I know the
 {{{SelectFeature}}} triggers its own events, but this was probably a poor
 choice design-wise (I'm the one to blame), and something we want to change
 in !OpenLayers... 3.

 So I'd rather add {{{featureentered}}} (or {{{featurehovered}}}) and
 {{{featureleft}}} events to {{{Layer.Vector}}} and have our controls that
 use a {{{Handler.Feature}}} ({{{DragFeature}}} and {{{SelectFeature}}})
 trigger these events when appropriate.

 Also, I'll accept a patch that (includes tests :) and adds {{{onEnter}}}
 and {{{onLeave}}} functions to {{{DragFeature}}}, alongside with
 {{{onStart}}} and {{{onDrag}}}. Adding {{{featureentered}}} and
 {{{featureleft}}} events to {{{Layer.Vector}}} could then be done later,
 if needed.

Ticket URL: <http://trac.openlayers.org/ticket/3034#comment:2>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer

More information about the Trac mailing list