Commit Graph

39 Commits

Author SHA1 Message Date
Frederic Junod
fdba4fc381 Add a test for ol.Map#getEventPixel 2015-08-19 13:50:14 +02:00
Éric Lemoine
192c9d697e Unregister the viewport listener on setTarget(null)
This commit unregisters the viewport resize listener when setTarget(null) is called, and registers it when setTarget(target) is called, and when we don't have that listener registered yet.

This prevents memory leaks where references to map objects are retained because of these viewport resize listeners.
2015-03-30 16:50:58 +02:00
Éric Lemoine
d07185e8f2 Add an "handleEvent" interaction option 2014-12-12 18:30:31 +01:00
Marc Jansen
2e37a34459 Fix typo in ol.Map test. 2014-07-28 09:35:23 +02:00
Tim Schaub
47d37fabea Rename ol.View2D to ol.View 2014-06-27 09:59:39 -04:00
Frederic Junod
4525276c6e Rename ol.Collection#getAt to ol.Collection#item
TouchList, DOMStringList, DOMTokenList, NodeList all have an
`item(index)` function to retrieve an item from a list.
We should do the same.
2014-06-06 09:49:12 +02:00
Tim Schaub
df05e9da11 Fire moveend only once after view settles 2014-05-14 14:23:31 -06:00
tsauerwein
5a358918e1 Rename interactions
The idea behind the naming scheme is that for example
for `DragRotate`, `Rotate` is the action and `Drag` the
gesture that issues the action.
2014-03-14 10:16:27 +01:00
tsauerwein
43aac5480c fixes interaction options in tests 2014-03-14 10:16:26 +01:00
Tom Payne
a8f932fa07 Rename ol.Map#requestRenderFrame to ol.Map#render 2014-02-20 16:54:20 +01:00
Antoine Abt
4dd8c248f5 Remove ol.RendererHints.createFromQueryData 2014-02-14 09:32:14 +01:00
Tim Schaub
36e2e51899 Only create a frame state if the map has non-zero size 2014-01-09 18:23:53 -07:00
Tim Schaub
7fb56579c5 Add addInteraction and removeInteraction methods to the map
This is in line with how we add/remove controls and overlays.
2013-10-31 09:26:28 -06:00
Tim Schaub
8b7a0a060c Export ol.interaction namespace instead of the defaults function 2013-09-04 13:55:54 -06:00
Tom Payne
ef17d4f3b8 Rename DblClickZoom to DoubleClickZoom 2013-04-23 15:31:15 +02:00
Tom Payne
a4d8e1c4d8 Correct property in ol.interaction.DefaultsOptions 2013-04-23 15:29:17 +02:00
Tom Payne
6751c2640d Remove fragile test
The user animation test is sensitive to small timing differences and
randomly fails.  This randomly breaks the integration tests.
2013-04-23 14:24:16 +02:00
Tom Payne
6c369ae907 Fix use of dispose in ol.Map tests 2013-04-22 17:16:44 +02:00
Tom Payne
02196c94b5 Redefine ol.Coordinate to be Array.<number> 2013-04-05 12:30:37 +02:00
Tom Payne
685f2b6f5f Make time-sensitive test less sensitive 2013-03-24 16:14:04 +01:00
Tim Schaub
27ccd13e48 Create test specific markup in tests
Instead of relying on a shared dom structure, the tests should create (and destroy) elements as needed.
2013-03-18 22:53:04 -06:00
Tobias Bieniek
47261124fc test: Added expect(spy).to.be.called() syntactic sugar 2013-03-13 17:18:23 +01:00
Tobias Bieniek
89ab68cde7 Replaced jasmine testing framework by mocha, expect.js and sinon
as discussed in #319
2013-03-13 04:32:43 +01:00
Tom Payne
671ee79c74 Add ol.interaction.defaults 2013-03-06 12:36:49 +01:00
Éric Lemoine
faef495cfd Debounce mousewheel zoom events 2013-03-05 09:59:31 +01:00
Éric Lemoine
57a86353cd zoomFactor defaults to 2 2013-03-05 09:59:30 +01:00
Tom Payne
df5f74b3c0 Add missing requires to specs 2013-03-04 20:02:55 +01:00
Frederic Junod
c0aa50abfc Split TouchRotateAndZoom interaction.
Split TouchRotateAndZoom interaction into two new interaction:
TouchRotate and TouchZoom.
2013-02-26 08:58:47 +01:00
Frederic Junod
735e534095 Add ol.interaction.TouchRotateAndZoom 2013-02-20 09:33:04 +01:00
Frederic Junod
d9a1c18300 Add ol.interaction.TouchPan 2013-02-20 09:32:34 +01:00
Tim Schaub
eef683fcdb Indentation for linter 2013-02-19 13:58:43 -07:00
Tim Schaub
0c48fbd188 Check sooner and only assert if duration hasn't passed 2013-02-05 10:50:18 -07:00
Éric Lemoine
b6ed5f2164 Use namespaces for tests
With this commit test files provide namespaces (using goog.provide). This fixes the issue reported by @bartvde where goog objects cannot be used in Jasmine "describe" functions. It also frees us from having to add script tags for the test files in test/ol.html.
2013-01-31 10:18:21 +01:00
Tim Schaub
141e5aa9fc Trim search string before use
The `window.location.search` string includes the "?" symbol.  Without this change, `createFromQueryData` only works if the "renderer" parameter is not in first position (see 4037bafc45).
2013-01-17 13:05:47 -07:00
Éric Lemoine
927cffb2b7 Add view abstraction 2013-01-09 14:03:16 +01:00
Éric Lemoine
b386c38111 Demonstrating user-controlled animation
Inspired from 840ffb6
2013-01-03 12:23:50 +01:00
Éric Lemoine
f49f370857 Make linter happy 2012-10-11 18:09:18 +02:00
Éric Lemoine
9c48dff286 Add tests for ol.Map.prototype.disposeInternal 2012-10-11 17:53:35 +02:00
Tom Payne
71e42b2448 Refactor build system
This rather large commit refactors the build system to solve a number of
problems:
- Object literal types are now declared in just one place
- There are no more circular dependencies
- There is no need for concealed subclasses in build-standalone mode

When building in standalone mode, you need to include the source in
build/src/external.  This declares object literal types as externs so
that their properties are not renamed.

When building with the application, you need to include the source in
build/src/internal.  This declares object literal types as typedefs so
that their properties can be renamed and removed.

Note also that ol.MapOptions has been merged into ol.Map, with some
renaming.
2012-09-29 11:51:53 +02:00