Commit Graph

60 Commits

Author SHA1 Message Date
Marc Jansen
a34e627b75 Remove dangling space in license header. 2013-02-07 10:33:20 +01:00
Tim Schaub
bbc73a21d8 Update copyright date 2013-01-07 22:01:16 -05:00
mosesonline
ef028b1e91 Update lib/OpenLayers/Control/SelectFeature.js
indentation fixed and added comment to explain null case
2012-12-20 08:55:21 +01:00
mosesonline
0cdb3aeb52 [BugFix] Fix selectFeatures is null exception when layer is destroyed. Since you can listen only to preremovelayer to handle removing layer with SelectFeature. But preremovelayer is triggered after selectFeatures is set to null. 2012-12-18 09:34:48 +01:00
Éric Lemoine
976554fc82 make SelectControl.unselectAll safer, use @ahocevar's implementation 2012-05-31 18:27:55 +02:00
Éric Lemoine
e603b06715 make SelectControl.unselectAll safer 2012-05-31 18:27:54 +02:00
Éric Lemoine
e0b93c2e45 The OpenLayers code is published under the 2-clause BSD license 2012-03-30 08:33:55 +02:00
Éric Lemoine
650df2a8f1 change copyright header in every OpenLayers js file 2012-03-29 22:14:56 +02:00
tschaub
2b5ade2dde Adding back events documentation.
When the list of event types became unconstrained in 501b42228a, we lost the documentation for events that are triggered.  This change adds the list of events triggered to the API docs for events properties.
2012-02-16 10:36:34 -07:00
ahocevar
ae55f1a70c Adding boxselectionstart and boxselectionend events.
Whitespace fixed from patch, and removed docs for beforefeatureselected and featureselected events because they are fired on the layer, not the control.
p=mosesonline, r=me (closes http://trac.osgeo.org/openlayers/ticket/3538)
2012-01-23 14:30:36 +01:00
fredj
a111808e06 replace Pixel argument with simple object (Map.getLonLatFromPixel) 2012-01-14 14:11:24 +01:00
tschaub
b844a3b11b Happy New Year!
Updating copyright to 2012.
2012-01-03 09:01:10 -07:00
Frédéric Junod
501b42228a remove event type list from Events (lazy listener initialization) p=tschaub,me r=erilem (closes #2555)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12384 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-09-17 19:09:40 +00:00
Marc Jansen
0020e79412 API documentation improvement. No functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12200 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-07-29 09:45:29 +00:00
Tim Schaub
995d612caa More robust array type check. p=mwootendev, r=me (closes #2959)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12095 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-06-16 19:16:25 +00:00
Éric Lemoine
1f58346772 SelectFeature control - highlightOnly and toggle don't play well together, p=me, r=bartvde (closes #2812)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11633 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 07:57:14 +00:00
Frédéric Junod
82a64751af fix Natural Docs comments, no functional change. p=jorix, r=me (closes #2989)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11576 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 08:19:18 +00:00
Tim Schaub
ad54169479 Happy New Year.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10995 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-03 15:39:40 +00:00
crschmidt
f0d474e50b Change license text to point to "OpenLayers contributors", referencing
authors.txt file. In reality, MetaCarta does not own copyright to these files,
they merely have a right to distribute them under the license terms agreed to
by the contributors. At this point, there is no longer any reference to
MetaCarta as a copyright holder in the OpenLayers project, only to its
individual contributors via the authors.txt file.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10706 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-01 03:06:31 +00:00
bartvde
602cf46c10 Marking setLayer on SelectFeature Control as API, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10613 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-11 09:37:15 +00:00
bartvde
c54dc76d15 when select feature control is destroyed and layers parameter was an array, the root container is not moved correctly, p=jorix, r=ahocevar,me (closes #2502)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10115 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-03-19 09:00:41 +00:00
pgiraud
7179166603 adds a new getVisibility method in the Feature.Vector class, used in the SelectFeature control this method now allows us to tell the select feature box handler wether to select or not the features, r=ahocevar, (Closes #2418)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10064 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-02-15 09:05:49 +00:00
Éric Lemoine
5edcc97240 cannot unselect on clickout when selecting by drawing a box, r=pgiraud (closes #2204)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9979 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-01-28 08:07:09 +00:00
bartvde
e77a804559 add setLayer function to SelectFeature control so that we can change the layer attached to the control on the fly, r=ahocevar (closes #2340)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9789 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-11-08 16:58:33 +00:00
ahocevar
d6a3c508a1 Fixed the scope of onSelect, onUnselect,... when scope is not specified.
r=crschmidt (pullup #2115)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@9419 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-06-01 16:27:02 +00:00
ahocevar
4664edacc8 better backwards compatibility -- only create the root container if
Control.SelectFeature constructor was called with an array of layers. 
r=crschmidt (closes #1666)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@9275 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-04-12 21:14:22 +00:00
pgiraud
49774f6ab5 SelectFeature now takes a hilightOnly config options, that way user can hover features without actually selecting
them, combining two differents controls will allow to separate hover and click events, patches from ahocevar, 
elemoine and 
pgiraud, reviewers are ahocevar, elemoine and pgiraud


git-svn-id: http://svn.openlayers.org/trunk/openlayers@9176 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-04-03 10:28:41 +00:00
ahocevar
b1c11b9814 changed the renderer's getRenderLayer method to getRenderLayerId, which
always works even if the layer is not added to a map. Also removed an 
unneeded map.events.unregister from Control.SelectFeature. r=elemoine
(closes #2022)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@9160 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-04-01 13:43:53 +00:00
Tim Schaub
fe0ddf9f21 Various other ndoc tweaks for controls.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9156 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-03-31 22:05:30 +00:00
ahocevar
2b1e8641f9 SelectFeature control can now select across multiple vector
layers when passed an array of layers instead of a single layer with 
the constructor. This changeset also introduces a new layer type, 
Layer.Vector.RootContainer, which will be set as the topmost layer by 
the SelectFeature control and collect the svg/vml/canvas roots of 
multiple vector layers. r=crschmidt (closes #1666)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@9116 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-03-22 14:25:18 +00:00
Éric Lemoine
95206bdeae enable programmatically calling the clickFeature metod of the select feature control, r=crschmidt (closes #1449)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@8944 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-03-03 12:45:24 +00:00
crschmidt
95c178adf2 A brilliant patch adding better documentation to all of our controls from an
unnamed contributor on OpenLayers trac. (Closes #1751)  


git-svn-id: http://svn.openlayers.org/trunk/openlayers@8942 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-03-03 06:30:15 +00:00
Éric Lemoine
7c0fadd14a ModifyFeature makes SelectFeature control behave/become like ModifyFeature, patch=bjornharrtell,tschaub, r=tschaub,me (closes #1741)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@8302 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-11-07 08:46:02 +00:00
crschmidt
693e6d07e3 Fix for Feature handler uses getFeatureFromEvent on mousemove even without
hover callbacks; r=ahocevar (Closes #1655) 

This means that On the SelectFeature control hover can no longer be set on the
SelectFeature control after the control has been initialized: must be passed at
initialize time. Example has been updated. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@7682 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-08-03 02:06:31 +00:00
Tim Schaub
6897c8ed4d Adding a beforefeatureselected event to the vector layer events. If a listener returns false, the feature is not selected. The modify feature control now listens for beforefeatureselected and triggers beforefeaturemodified. If a listener returns false, feature modification never begins. r=elemione,ahocevar (closes #1427)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7616 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-07-30 22:03:40 +00:00
Tim Schaub
a88ad8dc50 Adding a box property to the SelectFeature control for selecting all features within a box. p=pgiraud, r=me,crschmidt (closes #1071)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7589 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-07-29 18:20:19 +00:00
Tim Schaub
66e89b9bf0 Making the feature handler a dependency of the SelectFeature control.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6577 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-21 18:55:26 +00:00
ahocevar
c5dd8ada2c "users should be able to customize the select style per feature": Created a !StyleMap class which stores all styles that are needed for a layer. Controls that need to render features differently can now just give a render intent (e.g. "default", "select" or "temporary") to the layer's drawFeature method, instead of having extra style informations like Control.!SelectFeature.selectStyle. Existing application that set layer.style or feature.style are still supported, but both of these style properties are now null by default. r=crschmidt,elemoine,tschaub (closes #1120)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6240 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-12 23:05:47 +00:00
Tim Schaub
f27833f1db Trigger feature related events with feature information and layer related events with layer information. Also adding events.on and events.un convenience methods. r=crschmidt (closes #1343)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6149 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 23:31:27 +00:00
Tim Schaub
9bb51fb088 Taming the select feature control a bit. Previously, onUnselect was called twice for every unselection. r=elemoine (closes #1234)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5959 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-01 16:42:33 +00:00
ahocevar
45d5fdfd06 SelectFeature and OpenLayers.Feature.Vector.style["select"]: changed Control.SelectFeature to inherit properties that are not set in selectStyle from feature.style. r=tschaub (closes #1260)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5896 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-25 23:13:57 +00:00
crschmidt
09e0d3ec81 Update copyrights to 2008.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5614 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-01 08:14:55 +00:00
Tim Schaub
33e313b059 Separating jsdoc style docs into their own block. The new NaturalDocs doesn't parse these mixed blocks, giving us no class descriptions with the two together. (closes #1229)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5553 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-21 08:28:09 +00:00
Tim Schaub
72dd4047af doc change only - feature vector not vector feature
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5529 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 06:47:28 +00:00
Éric Lemoine
6fb48c0cd7 Enables unselecting selected features by clicking outside any feature. This is the default mode of the modify feature control. If you want to use the old mode where a click on a selected feature unselects that feature, set the toggle option to true. If you really want the old mode and not have selected features be unselected when clicking outside any feature, set the clickout option to false. The patch also adds the properties toggleKey and multipleKey to the modify feature control. With these one can temporarily enable the toggle and multiple mode, respectively. See the select-feature.html example to see all this in action. Thanks to pvalsecc and tschaub for the great colloration on this. (closes #1137)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5506 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-19 11:09:44 +00:00
euzuro
15e6809bf2 remove some stray oldschool jsdoc comments for the CLASS_NAME property. this re-closes the 853 ticket (Closes #853)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5157 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-09 16:23:54 +00:00
crschmidt
ed3221441c Refactor SVN layout in compliance with RFC/LicenseChange. This hopefully
completes an important blocker for moving forward with OSGeo incubation. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4985 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-17 02:21:22 +00:00
crschmidt
024779d898 With review from elem and additional tests, add filter by geometry type
to select feature control, with tests. (Closes #951)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4243 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-12 15:05:18 +00:00
Éric Lemoine
6f16455b1c select features on "click" as opposed to on "mousedown" (closes #891)
thanks to all for the review and to crschmidt for updating the patch


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4241 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-12 14:25:34 +00:00
crschmidt
48a9da00ec Erik helps me fix tests. I threaten to kill him for criticizing my lack
of semicolons. All is well. Fix for "keep selected features drawn with 
the right style". (Closes #916)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4232 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-12 05:12:00 +00:00