Commit Graph
100 Commits
Author SHA1 Message Date
Tim Schaub b0c0d077c9 Annotate always and never conditions as functions 2014-07-16 23:16:51 -06:00
Tim Schaub 12d94e1405 Document ol.inherits and annotate as a function 2014-07-16 23:16:30 -06:00
Tim Schaub 1657ed2d23 Make ol.proj.METERS_PER_UNIT exportable
We need to apply the `@api` annotation to the object itself in order for it to be exportable.
2014-07-15 15:49:48 -06:00
Tim Schaub aecaa52cb1 Make our build configs more portable by using the default src config
If a `src` config is not provided, by default, all of the library sources are included.  There is some special handling in the build task to make sure all library sources are included regardless of the path to the build config.  When someone includes a `src` config, path patterns are assumed to be relative to the current working directory (unless overriden with the `cwd` config).  So, when you use the `src` config, your config is no longer portable.
2014-07-14 17:52:10 -06:00
Tim Schaub 4f7073d7aa For jsdoc to find plugins, we need to set the cwd
This allows the `build.js` (and the exports from `generate-info.js`) to be run with a different working directory.
2014-07-14 14:42:42 -06:00
Tim Schaub 4de2520109 Add packages required to build the library to dependencies
This allows other packages to depend on the ol3 package and get the build tools (devDependencies are not installed when they are transitive dependencies).  The justification here is that the ol3 package becomes useful to other packages when you are able to run the build.js task.  For this task to run all of its dependencies must be available.
2014-07-14 14:19:24 -06:00
Tim Schaub f5830cc8e5 Unused JAVA executable 2014-07-12 14:46:05 -06:00
Tim Schaub 5010596ec0 Unused JAR executable 2014-07-12 14:45:20 -06:00
Tim Schaub db431ebdc6 No reason for build.py to run generate-exports.js
The doc task does not use the generated exports.js file.
2014-07-12 14:43:50 -06:00
Tim Schaub df2c14b7af Remove unnecessary linting of generated exports file 2014-07-12 14:43:50 -06:00
Tim Schaub c93e80a14a Always regenerate info using all sources if any have changed
Because we don't know if a new or modified file includes changes to the class hierarchy, we regenerate info for all sources any time any one has changed.  An alternative would be to generate info first for the new or modified file and then (potentially) regenerate info for more source files in the class hierarchy, but this makes the generate-info.js task far more complicated.
2014-07-12 14:39:18 -06:00
Tim Schaub a6f921d443 To force a download by setting the href, we need synchronous rendering 2014-07-11 21:49:57 -06:00
Tim Schaub 3e23da7c83 Minify CSS 2014-07-11 21:25:21 -06:00
Tim Schaub aa4dbde841 Remove static and other attributes from the docs 2014-07-11 19:47:49 -06:00
Tim Schaub 521cbfb1b0 Make internal proj constructors private 2014-07-10 16:37:07 -06:00
Tim Schaub 9c6cb9db6d Use goog.dom.fullscreen 2014-07-06 16:03:09 -06:00
Tim Schaub d0301805c7 Doc flip 2014-07-06 15:26:04 -06:00
Tim Schaub 1f88015db0 Add ol.proj.transformExtent function 2014-07-06 13:22:47 -06:00
Tim Schaub 21878ebad3 Lint 2014-07-06 12:47:33 -06:00
Tim Schaub 7e8551a767 Unused extensions 2014-07-06 12:43:55 -06:00
Tim Schaub 93716fc7f0 Extend expect.js rather than modify the source 2014-07-06 12:40:03 -06:00
Tim Schaub d8ca8e7341 Update test readme 2014-07-06 11:53:34 -06:00
Tim Schaub 264a01cfd4 Add jquery as a dev dependency 2014-07-06 11:47:58 -06:00
Tim Schaub 8a3f1a8f34 Add mocha and mocha-phantomjs as dev dependencies 2014-07-06 11:40:08 -06:00
Tim Schaub 70cb7a4a0a Add sinon as a dev dependency 2014-07-06 11:21:01 -06:00
Tim Schaub b452e04e08 Add a task to run the tests once with PhantomJS
The test.js task starts the development server and runs the tests in PhantomJS.  As mentioned in the readme, when running the tests continuously during development, it is more convenient to start the dev server and visit the root of the test directory in your browser.

Later we can bring in Karma to drive PhantomJS and other browsers, but this simple "run once" task is useful for the CI job.
2014-07-05 19:42:30 -04:00
Tim Schaub 5a24d022cf Extra annotations for build.py as well 2014-07-05 16:19:41 -04:00
Tim Schaub d99a61545c Use @observable annotation instead of @todo observable 2014-07-05 16:16:44 -04:00
Tim Schaub fd659d63e9 Remove @todo stability annotation (this has no effect) 2014-07-05 16:16:34 -04:00
Tim Schaub 10f4d0c3d7 Removing old code 2014-07-05 15:54:44 -04:00
Tim Schaub 8b29b52e95 Document olx.format.PolylineOptions
This was mistakenly annotated with `@todo stability` (which does nothing).
2014-07-05 15:43:03 -04:00
Tim Schaub 4cf5ab4620 Use @api annotation instead of @todo api 2014-07-05 15:41:14 -04:00
Tim Schaub 4b57f7798f Use goog.dom.classlist functions
The goog.dom.classes functions have now been deprecated.  See https://github.com/google/closure-library/commit/97e8a0c0fc7238a56cc4dacd4a96fd4c0735b992
2014-07-01 14:09:28 -04:00
Tim Schaub 97985934e1 Remove libtess.js 2014-07-01 08:45:09 -04:00
Tim Schaub a8a035468b Allow cwd to be configured for build
By default, all paths in the build config (e.g. externs) are assumed to be relative to the ol3 repo root.  To make it so relative paths are resolved from a different directory, use the cwd option.

In addition, this change makes it so the `build.js` task can be run from another directory.
2014-06-29 15:02:47 -04:00
Tim Schaub fb7d39005e Unused var 2014-06-29 12:55:30 -04:00
Tim Schaub 2f5a92c2c9 Treat classdesc as description 2014-06-28 10:46:36 -04:00
Tim Schaub 2ec63b6c58 Unnecessary ol.Tile requires 2014-06-27 19:57:54 -04:00
Tim Schaub 997517110c Unnecessary ol.Image require 2014-06-27 19:51:38 -04:00
Tim Schaub e802902f9b Rename ol.extent.getForView2DAndSize to ol.extent.getForViewAndSize 2014-06-27 09:59:39 -04:00
Tim Schaub 9565e17ee0 Rename ol.View2DProperty to ol.ViewProperty 2014-06-27 09:59:39 -04:00
Tim Schaub 878dcd1d28 Rename olx.View2DOptions to olx.ViewOptions 2014-06-27 09:59:39 -04:00
Tim Schaub 47d37fabea Rename ol.View2D to ol.View 2014-06-27 09:59:39 -04:00
Tim Schaub b9f444a008 Rename olx.View2DState to olx.ViewState and use viewState property 2014-06-27 09:58:25 -04:00
Tim Schaub 2e88f911dd Rename view.getView2DState() to view.getState() 2014-06-27 09:52:19 -04:00
Tim Schaub b88d2aebc9 Remove view.getView2D() method 2014-06-27 09:52:19 -04:00
Tim Schaub 956e1bf8b4 Remove ol.View base class 2014-06-27 09:52:19 -04:00
Tim Schaub 3c1cb55079 Remove IView and IView2D 2014-06-27 09:52:19 -04:00
Tim Schaub c74f945817 Remove IView3D 2014-06-27 09:52:19 -04:00
Tim Schaub d5de99bcf7 Add symbol kind to info 2014-06-25 11:11:22 -04:00
Tim Schaub 94f0513aa1 Update closure-util
The closure-util package works on Node 0.8, 0.10, and 0.11 (as of this writing), but it requires an updated version of npm to install on Node 0.8.  For the build to pass on Travis, we update npm before installing other dependencies.  For others who are installing the openlayers package, nothing special is required for Node 0.10 and above.  For users on Node 0.8, the openlayers package will only install with an updated version of npm.  This can be installed with npm itself.

    npm install -g npm # only needed on Node 0.8
2014-06-13 10:48:10 -07:00
Tim Schaub a9fc53e8da Make frameState property of ol.MapEvent exportable 2014-06-03 12:45:45 -06:00
Tim Schaub 0f04236fc4 Make map property of ol.MapEvent exportable 2014-06-03 12:45:03 -06:00
Tim Schaub 559feba1ed Add interface for map events so properties can be disambiguated 2014-06-03 12:43:45 -06:00
Tim Schaub 13d964488f Make getFeatureById method exportable 2014-06-03 11:42:47 -06:00
Tim Schaub 08ae509a7f Export method to get resolution for extent and size
While this is straightforward to calculate, this method adds convenience.
2014-05-29 11:21:31 -06:00
Tim Schaub 9323bbdcd0 Give Somaliland and Northern Cyprus unique ids 2014-05-26 10:31:27 -06:00
Tim Schaub a2b81d6bd0 Disallow adding the same feature twice 2014-05-23 16:52:11 -06:00
Tim Schaub 652f11cefa Provide a method for retrieving features by id 2014-05-23 16:35:07 -06:00
Tim Schaub 34cabd1579 Dispatch change on feature id change 2014-05-23 16:35:06 -06:00
Tim Schaub 25aefbeff5 Remove simple build profile
This was inadvertently added in d163f60e34 (see #2075).  Thanks @probins for the heads up.
2014-05-23 10:20:24 -06:00
Tim Schaub 097909516a Account for null or undefined geometry
The change in #2098 made it so a feature's geometry could be undefined.  This is consistent with the return type for the getGeometry method.  Where calling code needs to ensure that it has a geometry instance, it can use instanceof, goog.isDefAndNotNull(), or test for a truthy value.
2014-05-23 10:00:15 -06:00
Tim Schaub be03ec5aa1 Update dependencies
* closure-util@0.12.0 - force inclusion of deps.js files when compiling
 * jshint@2.5.1 - various enhancements and fixes (https://github.com/jshint/jshint/compare/2.4.4...2.5.1)
 * walk@2.3.3 - directory exclusion fix
2014-05-21 12:08:46 -06:00
Tim Schaub a4d31147bc Do not set geometry by default
A feature can have a geometry whose value is an ol.geom.Geometry instance or null.  A feature can also have no geometry property.  By default, a feature has no geometry property.  To set a geometry, one can be passed to the constructor (including null) or passed to setGeometry().
2014-05-21 09:16:54 -06:00
Tim Schaub c820a7a1f8 Additional doc for the namespace option
People should be discouraged from exporting to single letter namespaces to avoid collissions with the symbols generated by the compiler.
2014-05-21 13:22:40 +02:00
Tim Schaub 250f6901d3 Pass around single config object 2014-05-21 13:22:32 +02:00
Tim Schaub 3793f33acf Handle minZoom in getZoom and setZoom 2014-05-16 04:56:42 -06:00
Tim Schaub 815f5b38c8 Accept resolution or zoom related options for constrained views
Any of minResolution, maxResolution, minZoom, or maxZoom can be used to constrain the view resolutions.  Resolution options are given precedence over zoom options.
2014-05-15 17:31:55 -06:00
Tim Schaub 049531831c Move stability and inherited indicators after names 2014-05-14 16:27:30 -06:00
Tim Schaub 8fbf67b7e6 Remove space between ol. and Name 2014-05-14 16:26:44 -06:00
Tim Schaub 3a0efe83c5 Update map example 2014-05-14 15:11:12 -06:00
Tim Schaub df05e9da11 Fire moveend only once after view settles 2014-05-14 14:23:31 -06:00
Tim Schaub c3184f2cce Support for debug builds (concatenation only)
Whitespace builds are still painful to debug.  Skipping the compiler altogether and simply concatenating sources is a better option for development and debugging.  By ommitting the `compile` option in a build config, the output is "uncompiled" - a straight concatenation of all sources in dependency order.
2014-05-14 10:39:51 -06:00
Tim Schaub 4c8ba1bac6 Remove PhantomJS as a global dependency 2014-05-14 00:03:58 -06:00
Tim Schaub b860ec7a06 Do less work while processing touch events 2014-05-13 23:06:27 -06:00
Tim Schaub 7709d26955 Restore setTimeout after it is mocked 2014-05-13 22:44:36 -06:00
Tim Schaub 57a6fbf416 Call resetClickCountHandler_ with proper this argument 2014-05-13 17:41:58 -06:00
Tim Schaub d069f955f8 Document boolean defines as positive assertions 2014-05-05 07:41:53 -07:00
Tim Schaub 070f81aa7d Add description to symbols and defines 2014-05-05 07:41:53 -07:00
Tim Schaub f9157a6123 Rename generate-symbols.js to generate-info.js
This task generates build related metadata for the library based on doc annotations.  Since it is about more than writing out exportable symbols, it makes sense to have a more general name.
2014-05-05 07:41:47 -07:00
Tim Schaub 48828a238a Generate metadata for boolean defines in addition to exportable symbols 2014-05-05 07:14:23 -07:00
Tim Schaub 0b8f1e8944 Mark applyTransform as part of the API for all geometries 2014-05-02 13:24:04 -06:00
Tim Schaub e448f100fd Add a transform method to geometries
This accepts CRS identifiers for source and destination, transforms the geometry in place, and returns a reference to the geometry.
2014-05-02 11:47:59 -06:00
Tim Schaub 1110da37e1 Move ol.Sphere#circle to ol.geom.Polygon.circular
Previously, ol.geom.Polygon was a transitive dependency of ol.proj (since ol.proj requires ol.sphere.NORMAL, and all spheres were capable of generating circular polygons).  Instead, ol.proj should be lower-level.  Since it deals only with coordinate arrays, it shouldn't depend on all of the geometry code.

By adding a static `circular` function to `ol.geom.Polygon`, the dependency tree makes more sense.  If you want to create a polygon that approximates a circle on a sphere, you require `ol.geom.Polygon` and `ol.Sphere` (or one of the constants).

This makes room for geometries to have a `transform` method that takes projection-like arguments (meaning that `ol.geom.Geometry` will require `ol.proj`).
2014-05-02 11:25:44 -06:00
Tim Schaub f66ad1253f Reducing expectations about spherical interpolation precision
This avoids test failures in Chrome 34 (see also #1748 and https://code.google.com/p/v8/issues/detail?id=3006).
2014-05-02 10:23:03 -06:00
Tim Schaub 015aab8af3 Rename ol.extent.transform to ol.extent.applyTransform
This gives more consistency with ol.proj.applyTransform, allowing us to add a more convenient ol.extent.transform method that takes projection-like arguments.
2014-05-02 10:13:28 -06:00
Tim Schaub a4f1efbddb Add tests for geometry applyTransform method 2014-05-02 09:58:23 -06:00
Tim Schaub 4f9968d106 Rename transform to applyTransform for geometries 2014-05-02 09:27:53 -06:00
Tim Schaub f8e6fac90e Modules used in postinstall are dependencies
Since async and htmlparser2 are used by the postinstall task, they need to be listed as dependencies.  These will get installed when ol3 is a dependency of another project.
2014-04-30 17:54:39 -06:00
Tim Schaub 24498fa9d0 Defines in a namespace that can be required
For consistency, all defines are in the ol namespace.  If they are to be moved to another namespace, they need to be requireable.
2014-04-30 09:14:10 -06:00
Tim Schaub e4e3b2229a Defines in ol namespace defined in ol.js 2014-04-30 08:54:30 -06:00
Tim Schaub cec41c4b0a Add missing requires
Without explicit requires, it is possible that a build would exclude ol.js.
2014-04-30 08:37:52 -06:00
Tim Schaub 3f0da11008 Move ol defines from browserfeature.js to ol.js 2014-04-30 08:24:00 -06:00
Tim Schaub 193d5c9ac1 Rename EXTERNAL_SRC to EXPORTS
The build/exports.js file passes gjslint and jshint, so the separate linting task is not needed.
2014-04-29 09:57:25 -06:00
Tim Schaub a083c6149a No more generated internal source
With this change, the only two remaining generated scripts are build/exports.js and build/test/requireall.js.  Both are only required by Plovr.  With the Node based build task, a temporary exports.js file is created.  The Node based server can be used to run the tests without build/test/requireall.js.
2014-04-29 09:57:25 -06:00
Tim Schaub 9b4f61be3e No need for requireall.js when including exports.js 2014-04-29 09:57:25 -06:00
Tim Schaub d552dfd96d Making ol.proj.Projection subclasses exportable
Because ol.proj.EPSG4326 et al. extend ol.proj.Projection which has exportable methods, these constructors need to be exportable as well (e.g. so ol.proj.EPSG4326.prototype is defined in exports.js when calling goog.exportProperty on getCode etc.).  If we really don't want these to be exportable, they should be removed or made private (and named like ol.proj.EPSG4326_) for internal use only.
2014-04-29 09:57:25 -06:00
Tim Schaub ec6aa21912 Include goog.require calls in exports file 2014-04-29 09:57:25 -06:00
Tim Schaub d087fdbefd Add list of provides to symbol metadata 2014-04-29 09:57:25 -06:00
Tim Schaub fd170eb295 Accept a path for exports file 2014-04-29 09:57:19 -06:00