Tim Schaub
7e7631c42a
Named exports from ol/events
2018-01-24 10:09:57 -07:00
Tim Schaub
ad62739a6e
Use blocked scoped variables
...
In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
2018-01-12 00:50:30 -07:00
Tim Schaub
24dd0ca924
Rename _ol_Object_ to BaseObject
2018-01-10 09:35:43 -07:00
Tim Schaub
7f47883c48
Transformed
2017-12-12 06:53:18 -07:00
Tim Schaub
a3e3e99baa
Get rid of useless test exports
2017-08-17 15:16:58 -04:00
Tim Schaub
ed5dbd1293
Put test requires on top
2016-08-08 09:58:11 -06:00
Peter Robins
06fd92353b
Remove enums from tests
2016-06-03 11:10:46 +00:00
Tim Schaub
fd394151fd
Replace goog.object.clear() with ol.object.clear()
2016-02-04 06:54:44 -07:00
Tim Schaub
8aecb3270c
Replace goog.object.isEmpty() with ol.object.isEmpty()
2016-02-04 06:54:44 -07:00
Tim Schaub
3a4b504a5d
Add polyfill for Object.assign()
2016-02-04 06:54:43 -07: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
Frederic Junod
ca575bd35d
Dispatch a change event only if the value is different
2015-11-16 16:48:00 +01:00
Tim Schaub
f42c0cb0aa
Remove 2-way binding from objects
2015-04-07 08:35:47 -06:00
Guillaume Beraudo
6e7221ca28
Add ol.Object.unset() method
...
Allow deleting a property.
2015-03-30 13:30:10 +02:00
Frederic Junod
1d533d2924
Remove the beforepropertychange event from ol.Object
...
propertychange events include the oldValue so remove the beforepropertychange
event type.
2014-10-24 18:09:34 +02:00
Éric Lemoine
6d095bdf7c
Add old value to property change events
2014-10-24 09:24:37 +02:00
Éric Lemoine
ad83f83f2c
To do call toLowerCase when forming a change:property event
2014-09-18 18:44:45 +02:00
Éric Lemoine
64fcb1a0f5
Merge pull request #2264 from elemoine/object
...
ol.ObjectAccessor#transform shouldn't dispatch an event to the target object
2014-06-30 12:17:33 +02:00
Éric Lemoine
eafc2ac371
Change setValues to setProperties
2014-06-27 17:26:51 +02:00
Éric Lemoine
b67e71828d
Add a test for ol.Object
2014-06-27 10:17:13 +02:00
Tom Payne
37351c530c
Convert ol.ObjectEvent#getKey method into key property
2014-01-27 15:53:58 +01:00
Tim Schaub
20d74810ab
Export a getKey method on ol.ObjectEvent
2013-12-12 16:59:34 -07:00
Tim Schaub
69385f4ff0
More consistent event types
2013-12-11 16:54:01 -07:00
Tim Schaub
625007f364
Make enum property name like its value
...
Where an enum value is used as an event type, it should be alllowercase (to follow DOM events). Property names should be ALLUPPERCASE in this case (just as camelCase and PascalCase are converted to CONSTANT_CASE).
2013-12-11 16:54:01 -07:00
Tim Schaub
1783776976
Getting explicit about which type
2013-12-11 11:36:04 -07:00
Tim Schaub
153cb307e0
Handle beforechange events for bound properties
2013-12-11 11:25:51 -07:00
Tim Schaub
9d3a4e3c6c
Add beforechange event type and provide key with change events
...
If you know ahead of time that you only want to listen for changes for a specific property, the foo:change type events can be useful. If you want to listen for changes on all properties, the change event becomes more useful if it provides information on what changed. And the beforechange event allows listeners to access values before they change.
2013-12-11 11:25:50 -07:00
Tom Payne
bba1de2679
Add tests for ol.Object#bindTo getters and setters
2013-11-13 16:13:08 +01:00
Frederic Junod
984002a7ec
Change ol.Object event name syntax
...
'changed' to 'change' and '<attribute>_changed' to 'change:<attribute>'.
2013-05-31 12:38:37 +02:00
Tom Payne
4be8c991f7
Add missing Closure Library requires
2013-04-06 14:28:12 +02:00
Tom Payne
a1a2ab415f
Fix some trivial typos
2013-03-19 21:34:31 +01: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
Tim Schaub
2919906ba6
Add method for getting keys
2013-02-19 14:47:49 -07:00
Tim Schaub
d6ff58305d
Using a dedicated object for value storage
...
Without this, we are limited in the key names that we can accept from users. And because of compiler renaming, we don't know ahead of time what the limitations are (e.g. the key 'a' may clobber the 'set' method).
2013-02-19 14:35:11 -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
Tom Payne
21331d1065
Dispatch generic changed events when any ol.Object property changes
2013-01-08 17:26:22 +01:00
Tom Payne
b7def4c8c4
Clean up some lint problems in specs
2012-09-27 12:42:13 +02:00
Tom Payne
228e5a8dbf
Move requires to end of the file to ensure tests run even if goog.require fails
2012-09-26 19:40:16 +02:00
Éric Lemoine
4b015f9962
add Jasmine tests for ol.Object
2012-09-24 18:15:30 +02:00