Commit Graph

73 Commits

Author SHA1 Message Date
fredj
6e9a3e4c13 don't translate error message and replace console log with exception 2011-09-20 15:21:16 +02: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
Tim Schaub
4b2f6ea105 Adding 'active' as an API property.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12169 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-07-14 18:36:48 +00:00
bartvde
e1a32ba630 Control should set this.div to null in destroy, thanks jorix for the updated patch, p=jorix,me r=me,fredj (closes #2850)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11631 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 05:02:51 +00:00
crschmidt
31f1dd2610 Moving some properties (title, div, type, events, activate, deactivate) to
API Properties. (Closes #2827)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11570 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 00:56:20 +00:00
Tim Schaub
b9b7a68b19 Declaring dependencies in the source. Comments only commit.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11007 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-05 17:42:45 +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
ahocevar
ea3999d755 partially reverted r10732 (because we don't deactivate controls on destrly) and reverted r10810 (because it is not needed any more). r=elemoine (closes #2864)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10834 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-14 10:57:31 +00:00
Éric Lemoine
26d20c1fb1 cannot destroy a map with panels, r=fredj (closes #2864)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10810 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-06 09:15:00 +00:00
bartvde
0dc5793834 undo fix for #2850
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10790 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-24 08:44:12 +00:00
bartvde
fe16f7b409 Control should set this.div to null in destroy, r=fredj (closes #2850)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10789 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-24 06:39:08 +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
ahocevar
ea1290f8d8 Do not change the active state of button controls on a panel when a tool control is activated. p=jorix, r=me (closes #2764)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10576 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-04 07:56:25 +00:00
ahocevar
ee737577f7 2170_anonfuncs.diff: created functions returning true and false instead of using anonymous functions all over. p=rcoup, r=me (see #2170)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9759 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-10-24 09:23:24 +00:00
Tim Schaub
8b741bc666 Adding an autoActivate property for controls. If this is set to true, the control will be activated when it is added to a map. This is true for the Navigation, NavigationHistory, KeyboardDefaults, and Panel controls. False for others. r=elemoine (closes #2200)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9589 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-07-24 21:58:39 +00:00
Tim Schaub
1fd32e0ff8 Allowing users to better customize cursors for controls. Thanks to bartvde for the original patch and inspiration to get it done. Thanks ahocevar for the IE fix. r=ahocevar (closes #1484)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9258 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-04-09 21:59:53 +00:00
Tim Schaub
f2f118ad90 Reverting unintentional changes in r9234. Meant to just change the controls example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9235 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-04-07 20:43:27 +00:00
Tim Schaub
e72da4f74e Removing use of deprecated control.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9234 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-04-07 20:38:11 +00:00
Tim Schaub
8ba31e4a91 Consistent event type listing for controls.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9154 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-03-31 21:57:08 +00:00
crschmidt
2f367f6b8c OpenLayers.Console is used throughout the code, but not added as a dependancy.
Add @requires statements to pull it in everywhere it is needed. Since Console
is so small -- 634 bytes -- this should have a limited impact on anyone with a
custom build profile. (Closes #1549)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@8948 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-03-05 13:07:42 +00:00
euzuro
afecf46652 Small patch to allow an 'id' property to be custom-set on controls -- without being overrided by the default random id generator. Thanks to Stephen I for the bug report. r=elemoine (Closes #1687)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7829 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-08-22 13:23:16 +00:00
crschmidt
64fc4fcb1b Patch from funky_c to move all alert()s in the library to a single
OpenLayers.Console.userError function. This allows for easy overriding of this
function for people who need to report errors at an application level (or
hiding these errors entirely), with the same default behavior as previous
releases. Patch from funky_c, r=me, (Closes #1651)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@7675 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-08-01 22:21:50 +00:00
Tim Schaub
209f8f68f8 Fixing links in documentation. Other Natural Docs changes. (closes #1504)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6833 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-04-09 16:52:08 +00:00
crschmidt
f3d81983dd Add 'allowSelection' option to controls, to determine whether they allow
selection. Use CSS ClassName in FF, and onselectstart attribute in IE, to
control selection. Fix inappropriate overriding of className in some Control
subclasses in order to let this work. Prevents accidental selection of controls
in IE and FF. r=euzuro. (Closes #1378)  


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6727 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 05:55:12 +00:00
euzuro
463dc45fbb Adding support for new generation 'framed' popups. This patch includes numerous improvements to the main popups, including the addition of autoSizing, panIntoView, and full support for overflow:auto of the contents div. Thanks go out to the CloudAmber folks, to Pierre in la belle France, to the guys at TOPP and of course, to senior cr5 for his patience and help in the last and final stretch. this is a huge improvement in the popup arena and couldn't have been done without the broad help of everyone out there in the community. Thank you everyone for making this possible. Big step for OpenLayers. (Closes #926)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6718 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 04:43:36 +00:00
crschmidt
69ca5c7fdd Revert r6710: The new popup coe is going to need to change tests, so this
needs to wait.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6711 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 02:12:03 +00:00
Tim Schaub
e7b9a9a41b Adding explicit eventListener unregistering in map, layer, and control destroy methods. Note that this only makes explicit what is already happening elsewhere, but it makes us feel complete. Also throwing in the example I missed in the previous change. r=euzuro (closes #1404)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6447 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-06 18:24:18 +00:00
Tim Schaub
894c457fdd Adding eventListeners property to layer, control, and map. Setting this property at construction registers the given listeners based on event type key. r=elemoine (closes #1404)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6435 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-05 00:07:46 +00:00
Tim Schaub
57f6d9b914 Only destroy events if they are not already destroyed. This is relevant for controls with obligate controls. Since the map thinks it is in charge of destroying controls, and parent controls also destroy obligate controls, control.destroy ends up getting called twice. If someone wants to change the way this is handled, we should have a standard property that lets the map know that control.destroy is the responsibility of someone else. r=crschmidt (closes #1346)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6230 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-12 16:43:47 +00:00
ahocevar
886b963ce5 Fixed several destroy() methods to avoid running into undefined objects when the page unloads. r=crschmidt,me (closes #1222)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6172 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 18:51:48 +00:00
Tim Schaub
bf224d699d Giving all controls an events instance. You can now listen for activate and deactivate on any control. Panel controls do this to know when they should redraw. Navigation history control demonstrates the effect of this change. r=elemoine (closes #1346)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6167 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 16:46:02 +00:00
Tim Schaub
49e0bff93d For controls with multiple handlers, we now tack them on to a handlers object. The base destroy takes care of the handlers. r=crschmidt,uz/2 (closes #1338)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6106 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 15:52:03 +00:00
crschmidt
ea5e96df85 Add support to set the 'title' property of a control such that it will
be displayed when hovering over the control in a control.panel via its 
panel_div. r=me (Closes #822)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5910 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-27 14:44:16 +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
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
01154beb5d from fredj: "in lib/OpenLayers/Layer.js and lib/OpenLayers/Control.js the div
id is not passed to the createDiv() function." (Closes #1015)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4677 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-30 16:41:42 +00:00
crschmidt
33f85eeb35 From fredj: "layer.destroy() calls removeLayer() so control.destroy()
should do the same by calling removeControl()". (Closes #1009)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4676 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-30 16:25:43 +00:00
Tim Schaub
2337f9f2d8 Adding angle brackets to link class names in the docs (see #983).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4353 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-17 16:59:16 +00:00
Tim Schaub
c2148651ed Filling our log with cruft, adding meaningless conflicts for merges, and changing a comment style that ndocs could care less about, this commit changes Return to Returns (closes #945).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4110 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-08-29 18:44:10 +00:00
crschmidt
6194452b8a Since John already went ahead and committed the main change, I'm just going
to finish this one up. All commits are in comments, so a review doesn't seem
strictly neccesary. This closes #918 and fixes all the copyrights that I could 
find in the code.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3984 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-08-23 11:29:06 +00:00
euzuro
fd4d2918f1 fix for #853 - remove JSDOC comments from CLASS_NAME variables
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3787 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-07-23 15:09:09 +00:00
Tim Schaub
cc1b0269c9 #823 New class style. Instead of OldStyle = Class.create(); OldStyle.prototype = Class.inherit(Parent, prototype), we now use NewStyle = OpenLayers.Class(Parent, prototype). New style classes allow for backwards compatibility [you can use OldStyle = Class.create(); Class.inherit(NewStyle, prototype)]. The Class.create and Class.inherit functions are deprecated. Backwards compatibility will be removed at 3.0. Thanks Erik for the careful review.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3767 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-07-16 20:25:11 +00:00
crschmidt
4f70df0029 Documentation improvements provided by Glen Stampoultzis. (Thanks Glen!) Closes
#825, #836.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3728 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-07-13 11:14:46 +00:00
Tim Schaub
0638628a50 replace tabs with spaces
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3672 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-07-10 18:30:50 +00:00
crschmidt
3948913bfc Merge all changes from the naturaldocs sandbox. This brings all the work that
has been done in the NaturalDocs branch back to trunk. Thanks to everyone who
helped out in making this happen. (I could list people, but the list would
be long, and I'm already mentally on vacation.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3545 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-06-29 15:59:20 +00:00
crschmidt
ee326b9440 Commit patch for #788, "Control displayClass is not correct if CLASS_NAME
contains >= 2 periods"  from fredj, who is a wonderful contributor who not only
wrote code, and tests, but upgraded all the existing control tests, because he
is just that full of awesome. (Thanks Fred!) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3534 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-06-29 09:54:20 +00:00
euzuro
172bbcb3df coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3263 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-06-06 18:12:27 +00:00
crschmidt
970c9655ac Destroy handler if we have one.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2944 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-31 18:33:21 +00:00
crschmidt
3ca974acec Merge vector-2.4 branch back to trunk.
svn merge sandbox/vector-2.4/@2307 sandbox/vector-2.4/@HEAD trunk/openlayers/


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2803 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-16 13:23:56 +00:00
Schuyler Erle
a3acddd8bd Corrected typo in Control.moveTo. Thanks to Craig Barnes for finding this bug. Fixes #531.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2726 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-13 18:05:12 +00:00