From 8dc3b951942e13dbe2ed58e47dd8b94dc93a999a Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Thu, 29 May 2014 11:21:42 +0100 Subject: [PATCH] Improvements to externs readme --- externs/readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/externs/readme.md b/externs/readme.md index 68253b3448..5fe47b5c9f 100644 --- a/externs/readme.md +++ b/externs/readme.md @@ -8,7 +8,7 @@ These two files are special externs that belong to ol3, and this document explai ### Prevent class properties from being renamed -For events, we make properties available to the application. Other than methods, which can be made available by just marking them with the `@api` annotation directly where they are defined, properties need to be added to `oli.js` in addition: +For events, we make properties available to the application. Methods can be made available by just marking them with the `@api` annotation directly where they are defined; properties should also be added to `oli.js`: ```js /** @interface */ @@ -43,7 +43,7 @@ ol.MapBrowserEvent = function(type, map, browserEvent, opt_frameState) { ### Override methods in custom classes -For custom subclasses in applications, which can be created using `ol.extends`, the API may want to make certain methods available to override. In addition to marking such methods as `@api`, they need also be added to an interface in `oli.js`: +For custom subclasses in applications, which can be created using `ol.inherits`, the API may want to make certain methods available to override. In addition to marking such methods as `@api`, they should also be added to an interface in `oli.js`: ```js /** * @interface @@ -79,6 +79,7 @@ ol.control.Control.prototype.setMap = function(map) { // ... }; ``` +See Custom controls example for an example of how this can be used. ### Export object literals