Commit Graph

29 Commits

Author SHA1 Message Date
Tim Schaub
f3b97d6bef Use string instead of string|ol.events.EventType 2016-02-03 11:19:38 +01:00
Tim Schaub
f10c90bdba Simpler type for ol.events.Key
Instead of having `ol.events.Key` be a listener object or an array of listener objects, it should be less error prone to have it just be a single listener object.

To avoid using too many functions with multiple return types, the `ol.events.*` functions for registering and unregistering listeners no longer accept an array of event types (and only a single key is returned when registering).

To make it convenient for users to register multiple listeners at once, the `observable.on()` method accepts an array of event types.  Internally in the library, we should use the less risky `ol.events.listen()`.
2016-02-03 11:19:38 +01:00
Tim Schaub
80df1f5ae8 Move opt_useCapture arg to the end of the list 2016-02-03 11:19:38 +01:00
Andreas Hocevar
3f2d79b7fe Replace goog.events.Event/EventTarget system with our own
This also removes goog.events.listen, goog.events.unlisten,
goog.events.unlistenByKey and goog.events.BrowserEvent.
2016-02-03 11:19:38 +01:00
Tim Schaub
13a981c94b Fewer blank lines 2016-01-11 22:03:23 -08:00
Frederic Junod
946ef8878d Export ol.Observable#dispatchEvent function 2015-09-15 09:56:26 +02:00
Tim Schaub
91f47a876c Missing ol.Observable#getRevision description 2015-09-06 07:57:41 -06:00
Frederic Junod
2d92791b17 Remove deprecated checkStructDictInheritance
Deprecated since the 20150505 Closure Compiler release.
See https://github.com/google/closure-compiler/wiki/Releases#may-5-2015-v20150505
2015-08-20 11:40:22 +02:00
Andreas Hocevar
3595c2cce7 Document change events properly
With this change, the generic 'change' event is properly documented, as
all other events. It is no longer necessary to annotate `@fires change` for
every ol.Observable subclass.
2015-07-18 15:27:16 +02:00
Pierre GIRAUD
84d22266d6 Fix typo in documentation comment 2015-04-23 11:20:28 +02:00
Éric Lemoine
b832c42585 Add ol.Observable.unByKey 2014-10-08 14:41:45 +02:00
Andreas Hocevar
ebe3b48e0a Rename ol.Observable#dispatchChangeEvent() to #changed()
Since dispatchChangeEvent does not only dispatch a change event, but
also increases the revision counter, the method name should reflect
this.
2014-09-04 19:30:48 -06:00
Éric Lemoine
f3930d751e Add @api stable annotations for ol.Observable 2014-08-22 09:16:28 +02:00
Peter Robins
7a5a5d75e7 Improve and standardise event docs 2014-08-18 15:17:02 +00:00
Tim Schaub
4cf5ab4620 Use @api annotation instead of @todo api 2014-07-05 15:41:14 -04:00
Björn Harrtell
8fab2f7d25 Add getRevision to api
The revision can be useful for instance to check if a feature has been modified so I'd like to see it in api.
2014-06-25 16:19:42 +02:00
Peter Robins
75be215497 Add standard docs text to abstract base classes 2014-06-14 07:20:33 -04:00
Peter Robins
41d9f0360a Add @classdesc to classes 2014-06-09 12:10:19 -04:00
Andreas Hocevar
b2805c58de Better document which events are fired
The map does not fire ol.render.Event#render. Change events are
now only listed for classes that fire them, and a description
about when they are fired is added.
2014-05-15 20:28:09 +02:00
Andreas Hocevar
fbdbbfb7a7 Get rid of stability annotations and document stability with api
This change adds a stability value to the api annotation, with
'experimental' as default value.

enum, typedef and event annotations are never exportable, but
api annotations are needed there to make them appear in the
docs.

Nested typedefs are no longer inlined recursively, because the
resulting tables get too wide with the current template.
2014-04-29 09:53:07 -06:00
Andreas Hocevar
c17ac0cae3 Greatly simplify and document the usage of JSDoc
This commit simplifies the exports.js plugin so it only relies
on the stability notes to generate the documentation, which
completely decouples it from the exportable API.

As a rule of thumb, whenever something has an 'api' annotation,
it should also have a 'stability' annotation. A more verbose
documentation of ol3 specific annotation usage is available in
the new 'apidoc/readme.md' file.

This commit also modifies all source files to implement these
usage suggestions.
2014-04-29 09:53:06 -06:00
Tim Schaub
fb497f5288 Annotations for exports 2014-04-29 09:53:05 -06:00
ahocevar
a3b5376520 Add missing event documentation and stability tags 2014-03-26 14:04:58 +01:00
Tom Payne
ce1da8b57a Add stability annotation to ol.Observable 2014-02-03 14:45:00 +01:00
Tom Payne
9c195eb314 Add ol.Observable#dispatchChangeEvent 2014-01-21 11:41:56 +01:00
Tom Payne
0219ddc60f Add ol.Observable#getRevision 2014-01-21 11:41:33 +01:00
Tom Payne
176c873830 Use opt_this instead of opt_scope in ol.Observable 2014-01-15 14:49:16 +01:00
Tom Payne
90e44c3979 Make ol.Observable a @struct 2013-12-13 20:44:10 +01:00
Tim Schaub
3dc40f8cb6 Add ol.Observable for on, once, un, and unByKey methods 2013-12-05 12:27:30 -07:00