diff --git a/old/src/ol/feature.js b/old/src/ol/feature.js
index 787922c46d..23b50c4dc6 100644
--- a/old/src/ol/feature.js
+++ b/old/src/ol/feature.js
@@ -1,14 +1,13 @@
goog.provide('ol.Feature');
goog.provide('ol.FeatureEvent');
goog.provide('ol.FeatureEventType');
+goog.provide('ol.FeatureRenderIntent');
goog.require('goog.events');
goog.require('goog.events.Event');
goog.require('goog.events.EventType');
goog.require('ol.Object');
goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryEvent');
-goog.require('ol.layer.VectorLayerRenderIntent');
@@ -28,6 +27,12 @@ goog.require('ol.layer.VectorLayerRenderIntent');
*/
ol.Feature = function(opt_values) {
+ /**
+ * @type {ol.Extent}
+ * @private
+ */
+ this.geometryExtent_ = null;
+
goog.base(this, opt_values);
/**
@@ -42,19 +47,12 @@ ol.Feature = function(opt_values) {
*/
this.geometryName_;
- /**
- * Original of this feature when it was modified.
- * @type {ol.Feature}
- * @private
- */
- this.original_ = null;
-
/**
* The render intent for this feature.
- * @type {ol.layer.VectorLayerRenderIntent|string}
+ * @type {ol.FeatureRenderIntent|string}
* @private
*/
- this.renderIntent_ = ol.layer.VectorLayerRenderIntent.DEFAULT;
+ this.renderIntent_ = ol.FeatureRenderIntent.DEFAULT;
/**
* @type {Array.
}
@@ -114,15 +112,6 @@ ol.Feature.prototype.getGeometry = function() {
};
-/**
- * Get the original of this feature when it was modified.
- * @return {ol.Feature} Original.
- */
-ol.Feature.prototype.getOriginal = function() {
- return this.original_;
-};
-
-
/**
* Get any symbolizers set directly on the feature.
* @return {Array.} Symbolizers (or null if none).
@@ -134,12 +123,14 @@ ol.Feature.prototype.getSymbolizers = function() {
/**
* Listener for geometry change events.
- * @param {ol.geom.GeometryEvent} evt Geometry event.
+ * @param {goog.events.Event} evt Change event.
* @private
*/
ol.Feature.prototype.handleGeometryChange_ = function(evt) {
+ var oldExtent = this.geometryExtent_;
+ this.geometryExtent_ = this.getGeometry().getBounds();
this.dispatchEvent(new ol.FeatureEvent(
- ol.FeatureEventType.CHANGE, this, evt.oldExtent));
+ ol.FeatureEventType.CHANGE, this, oldExtent));
};
@@ -151,10 +142,10 @@ ol.Feature.prototype.handleGeometryChange_ = function(evt) {
*/
ol.Feature.prototype.set = function(key, value) {
var geometry = this.getGeometry();
- var oldExtent = null;
+ var oldExtent = this.geometryExtent_;
if (goog.isDefAndNotNull(geometry)) {
- oldExtent = geometry.getBounds();
if (key === this.geometryName_) {
+ this.geometryExtent_ = null;
goog.events.unlisten(geometry, goog.events.EventType.CHANGE,
this.handleGeometryChange_, false, this);
}
@@ -164,6 +155,7 @@ ol.Feature.prototype.set = function(key, value) {
this.geometryName_ = key;
}
if (key === this.geometryName_) {
+ this.geometryExtent_ = value.getBounds();
goog.events.listen(value, goog.events.EventType.CHANGE,
this.handleGeometryChange_, false, this);
}
@@ -198,15 +190,6 @@ ol.Feature.prototype.setGeometry = function(geometry) {
};
-/**
- * Set the original of this feature when it was modified.
- * @param {ol.Feature} original Original.
- */
-ol.Feature.prototype.setOriginal = function(original) {
- this.original_ = original;
-};
-
-
/**
* Gets the renderIntent for this feature.
* @return {string} Render intent.
@@ -247,6 +230,18 @@ ol.Feature.prototype.setSymbolizers = function(symbolizers) {
ol.Feature.DEFAULT_GEOMETRY = 'geometry';
+/**
+ * @enum {string}
+ */
+ol.FeatureRenderIntent = {
+ DEFAULT: 'default',
+ FUTURE: 'future',
+ HIDDEN: 'hidden',
+ SELECTED: 'selected',
+ TEMPORARY: 'temporary'
+};
+
+
/**
* @enum {string}
*/
diff --git a/old/src/ol/geom/abstractcollection.js b/old/src/ol/geom/abstractcollection.js
index 62d42514c8..32552f262a 100644
--- a/old/src/ol/geom/abstractcollection.js
+++ b/old/src/ol/geom/abstractcollection.js
@@ -1,9 +1,7 @@
goog.provide('ol.geom.AbstractCollection');
-goog.require('goog.events.EventType');
goog.require('ol.extent');
goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryEvent');
@@ -77,21 +75,12 @@ ol.geom.AbstractCollection.prototype.getType = goog.abstractMethod;
/**
* Listener for component change events.
- * @param {ol.geom.GeometryEvent} evt Geometry event.
+ * @param {goog.events.Event} evt Change event.
* @protected
*/
ol.geom.AbstractCollection.prototype.handleComponentChange = function(evt) {
this.bounds = null;
- var oldExtent = ol.extent.createEmpty();
- var components = this.components;
- for (var i = components.length - 1; i >= 0; --i) {
- var component = components[i];
- ol.extent.extend(oldExtent,
- component === evt.target && !goog.isNull(evt.oldExtent) ?
- evt.oldExtent : component.getBounds());
- }
- this.dispatchEvent(new ol.geom.GeometryEvent(goog.events.EventType.CHANGE,
- this, oldExtent));
+ this.dispatchChangeEvent();
};
diff --git a/old/src/ol/geom/geometry.js b/old/src/ol/geom/geometry.js
index 963950c8f0..5b88f8a264 100644
--- a/old/src/ol/geom/geometry.js
+++ b/old/src/ol/geom/geometry.js
@@ -1,24 +1,41 @@
goog.provide('ol.geom.Geometry');
-goog.provide('ol.geom.GeometryEvent');
goog.provide('ol.geom.GeometryType');
-goog.require('goog.events.Event');
-goog.require('goog.events.EventTarget');
+goog.require('goog.events.EventType');
goog.require('goog.object');
goog.require('ol.Extent');
+goog.require('ol.Observable');
goog.require('ol.TransformFunction');
+/**
+ * Geometry types.
+ *
+ * @enum {string}
+ * @todo stability stable
+ */
+ol.geom.GeometryType = {
+ POINT: 'Point',
+ LINE_STRING: 'LineString',
+ LINEAR_RING: 'LinearRing',
+ POLYGON: 'Polygon',
+ MULTI_POINT: 'MultiPoint',
+ MULTI_LINE_STRING: 'MultiLineString',
+ MULTI_POLYGON: 'MultiPolygon',
+ GEOMETRY_COLLECTION: 'GeometryCollection'
+};
+
+
/**
* @constructor
- * @extends {goog.events.EventTarget}
+ * @extends {ol.Observable}
* @todo stability experimental
*/
ol.geom.Geometry = function() {
goog.base(this);
};
-goog.inherits(ol.geom.Geometry, goog.events.EventTarget);
+goog.inherits(ol.geom.Geometry, ol.Observable);
/**
@@ -57,36 +74,9 @@ ol.geom.Geometry.prototype.getType = goog.abstractMethod;
ol.geom.Geometry.prototype.transform = goog.abstractMethod;
-
/**
- * Constructor for geometry events.
- * @constructor
- * @extends {goog.events.Event}
- * @param {string} type Event type.
- * @param {ol.geom.Geometry} target The target geometry.
- * @param {ol.Extent} oldExtent The previous geometry extent.
+ * Dispatch a generic event with type "change."
*/
-ol.geom.GeometryEvent = function(type, target, oldExtent) {
- goog.base(this, type, target);
-
- this.oldExtent = oldExtent;
-};
-goog.inherits(ol.geom.GeometryEvent, goog.events.Event);
-
-
-/**
- * Geometry types.
- *
- * @enum {string}
- * @todo stability experimental
- */
-ol.geom.GeometryType = {
- POINT: 'point',
- LINESTRING: 'linestring',
- LINEARRING: 'linearring',
- POLYGON: 'polygon',
- MULTIPOINT: 'multipoint',
- MULTILINESTRING: 'multilinestring',
- MULTIPOLYGON: 'multipolygon',
- GEOMETRYCOLLECTION: 'geometrycollection'
+ol.geom.Geometry.prototype.dispatchChangeEvent = function() {
+ this.dispatchEvent(goog.events.EventType.CHANGE);
};
diff --git a/old/src/ol/geom/linestring.js b/old/src/ol/geom/linestring.js
index e7ed07843b..3eeae4d84e 100644
--- a/old/src/ol/geom/linestring.js
+++ b/old/src/ol/geom/linestring.js
@@ -1,12 +1,10 @@
goog.provide('ol.geom.LineString');
goog.require('goog.asserts');
-goog.require('goog.events.EventType');
goog.require('ol.CoordinateArray');
goog.require('ol.coordinate');
goog.require('ol.extent');
goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryEvent');
goog.require('ol.geom.GeometryType');
@@ -15,7 +13,7 @@ goog.require('ol.geom.GeometryType');
* @constructor
* @extends {ol.geom.Geometry}
* @param {ol.CoordinateArray} coordinates Array of coordinates (e.g.
- * [[x0, y0], [x1, y1]]).
+ * `[[x0, y0], [x1, y1]]`).
* @todo stability experimental
*/
ol.geom.LineString = function(coordinates) {
@@ -90,7 +88,7 @@ ol.geom.LineString.prototype.getBounds = function() {
* @inheritDoc
*/
ol.geom.LineString.prototype.getType = function() {
- return ol.geom.GeometryType.LINESTRING;
+ return ol.geom.GeometryType.LINE_STRING;
};
@@ -116,11 +114,9 @@ ol.geom.LineString.prototype.distanceFromCoordinate = function(coordinate) {
* @param {ol.CoordinateArray} coordinates Coordinates array.
*/
ol.geom.LineString.prototype.setCoordinates = function(coordinates) {
- var oldBounds = this.bounds_;
this.bounds_ = null;
this.coordinates_ = coordinates;
- this.dispatchEvent(new ol.geom.GeometryEvent(goog.events.EventType.CHANGE,
- this, oldBounds));
+ this.dispatchChangeEvent();
};
@@ -134,5 +130,5 @@ ol.geom.LineString.prototype.transform = function(transform) {
coord = coordinates[i];
transform(coord, coord, coord.length);
}
- this.setCoordinates(coordinates); // for change event
+ this.setCoordinates(coordinates); // for invalidating bounds
};
diff --git a/old/src/ol/geom/point.js b/old/src/ol/geom/point.js
index b11f862858..713b6f19d9 100644
--- a/old/src/ol/geom/point.js
+++ b/old/src/ol/geom/point.js
@@ -1,10 +1,8 @@
goog.provide('ol.geom.Point');
goog.require('goog.asserts');
-goog.require('goog.events.EventType');
goog.require('ol.Coordinate');
goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryEvent');
goog.require('ol.geom.GeometryType');
@@ -12,7 +10,7 @@ goog.require('ol.geom.GeometryType');
/**
* @constructor
* @extends {ol.geom.Geometry}
- * @param {ol.Coordinate} coordinates Coordinate values (e.g. [x, y]).
+ * @param {ol.Coordinate} coordinates Coordinate values (e.g. `[x, y]`).
* @todo stability experimental
*/
ol.geom.Point = function(coordinates) {
@@ -79,11 +77,9 @@ ol.geom.Point.prototype.getType = function() {
* @param {ol.Coordinate} coordinates Coordinates array.
*/
ol.geom.Point.prototype.setCoordinates = function(coordinates) {
- var oldBounds = this.bounds_;
this.bounds_ = null;
this.coordinates_ = coordinates;
- this.dispatchEvent(new ol.geom.GeometryEvent(goog.events.EventType.CHANGE,
- this, oldBounds));
+ this.dispatchChangeEvent();
};
@@ -93,5 +89,5 @@ ol.geom.Point.prototype.setCoordinates = function(coordinates) {
ol.geom.Point.prototype.transform = function(transform) {
var coordinates = this.getCoordinates();
transform(coordinates, coordinates, coordinates.length);
- this.setCoordinates(coordinates); // for change event
+ this.setCoordinates(coordinates); // for invalidating bounds
};
diff --git a/old/src/ol/geom/polygon.js b/old/src/ol/geom/polygon.js
index dff49abef3..78eede62f9 100644
--- a/old/src/ol/geom/polygon.js
+++ b/old/src/ol/geom/polygon.js
@@ -6,7 +6,6 @@ goog.require('goog.events.EventType');
goog.require('ol.CoordinateArray');
goog.require('ol.extent');
goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryEvent');
goog.require('ol.geom.GeometryType');
goog.require('ol.geom.LinearRing');
@@ -108,19 +107,11 @@ ol.geom.Polygon.prototype.getRings = function() {
/**
* Listener for ring change events.
- * @param {ol.geom.GeometryEvent} evt Geometry event.
+ * @param {goog.events.Event} evt Change event.
* @private
*/
ol.geom.Polygon.prototype.handleRingChange_ = function(evt) {
- var ring = evt.target;
- var oldExtent = null;
- if (ring === this.rings_[0]) {
- oldExtent = evt.oldExtent;
- } else {
- oldExtent = this.getBounds();
- }
- this.dispatchEvent(new ol.geom.GeometryEvent(goog.events.EventType.CHANGE,
- this, oldExtent));
+ this.dispatchChangeEvent();
};
diff --git a/old/src/ol/interaction/drawinteraction.js b/old/src/ol/interaction/drawinteraction.js
index 6157a21131..b2bd009c99 100644
--- a/old/src/ol/interaction/drawinteraction.js
+++ b/old/src/ol/interaction/drawinteraction.js
@@ -10,6 +10,7 @@ goog.require('ol.MapBrowserEvent');
goog.require('ol.MapBrowserEvent.EventType');
goog.require('ol.geom.GeometryType');
goog.require('ol.geom.LineString');
+goog.require('ol.geom.LinearRing');
goog.require('ol.geom.MultiLineString');
goog.require('ol.geom.MultiPoint');
goog.require('ol.geom.MultiPolygon');
@@ -209,6 +210,7 @@ ol.interaction.Draw.prototype.atFinish_ = function(event) {
if (this.mode_ === ol.interaction.DrawMode.LINESTRING) {
potentiallyDone = geometry.getCoordinates().length > 2;
} else if (this.mode_ === ol.interaction.DrawMode.POLYGON) {
+ goog.asserts.assertInstanceof(geometry, ol.geom.Polygon);
potentiallyDone = geometry.getRings()[0].getCoordinates().length > 3;
}
if (potentiallyDone) {
@@ -270,22 +272,29 @@ ol.interaction.Draw.prototype.modifyDrawing_ = function(event) {
var geometry = this.sketchFeature_.getGeometry();
var coordinates, last;
if (this.mode_ === ol.interaction.DrawMode.POINT) {
+ goog.asserts.assertInstanceof(geometry, ol.geom.Point);
last = geometry.getCoordinates();
last[0] = coordinate[0];
last[1] = coordinate[1];
geometry.setCoordinates(last);
} else {
if (this.mode_ === ol.interaction.DrawMode.LINESTRING) {
+ goog.asserts.assertInstanceof(geometry, ol.geom.LineString);
coordinates = geometry.getCoordinates();
- } else if (this.mode_ === ol.interaction.DrawMode.POLYGON) {
+ } else {
+ goog.asserts.assert(this.mode_ === ol.interaction.DrawMode.POLYGON);
+ goog.asserts.assertInstanceof(geometry, ol.geom.Polygon);
geometry = geometry.getRings()[0];
+ goog.asserts.assertInstanceof(geometry, ol.geom.LinearRing);
coordinates = geometry.getCoordinates();
}
if (this.atFinish_(event)) {
// snap to finish
coordinate = this.finishCoordinate_.slice();
}
- this.sketchPoint_.getGeometry().setCoordinates(coordinate);
+ var point = this.sketchPoint_.getGeometry();
+ goog.asserts.assertInstanceof(point, ol.geom.Point);
+ point.setCoordinates(coordinate);
last = coordinates[coordinates.length - 1];
last[0] = coordinate[0];
last[1] = coordinate[1];
@@ -304,11 +313,13 @@ ol.interaction.Draw.prototype.addToDrawing_ = function(event) {
var geometry = this.sketchFeature_.getGeometry();
var coordinates, last;
if (this.mode_ === ol.interaction.DrawMode.LINESTRING) {
+ goog.asserts.assertInstanceof(geometry, ol.geom.LineString);
this.finishCoordinate_ = coordinate.slice();
coordinates = geometry.getCoordinates();
coordinates.push(coordinate.slice());
geometry.setCoordinates(coordinates);
} else if (this.mode_ === ol.interaction.DrawMode.POLYGON) {
+ goog.asserts.assertInstanceof(geometry, ol.geom.Polygon);
var ring = geometry.getRings()[0];
coordinates = ring.getCoordinates();
coordinates.push(coordinate.slice());
@@ -329,10 +340,12 @@ ol.interaction.Draw.prototype.finishDrawing_ = function(event) {
var geometry = sketchFeature.getGeometry();
var coordinates = geometry.getCoordinates();
if (this.mode_ === ol.interaction.DrawMode.LINESTRING) {
+ goog.asserts.assertInstanceof(geometry, ol.geom.LineString);
// remove the redundant last point
coordinates.pop();
geometry.setCoordinates(coordinates);
} else if (this.mode_ === ol.interaction.DrawMode.POLYGON) {
+ goog.asserts.assertInstanceof(geometry, ol.geom.Polygon);
// force clockwise order for exterior ring
sketchFeature.setGeometry(new ol.geom.Polygon(coordinates));
}
diff --git a/old/src/ol/interaction/modifyinteraction.js b/old/src/ol/interaction/modifyinteraction.js
index 94fde65c71..33fc1fde76 100644
--- a/old/src/ol/interaction/modifyinteraction.js
+++ b/old/src/ol/interaction/modifyinteraction.js
@@ -339,8 +339,9 @@ ol.interaction.Modify.prototype.createOrUpdateVertexFeature_ =
this.vertexFeature_ = vertexFeature;
this.sketchLayer_.getVectorSource().addFeatures([vertexFeature]);
} else {
- var geometry = vertexFeature.getGeometry();
- geometry.setCoordinates(coordinates);
+ var point = vertexFeature.getGeometry();
+ goog.asserts.assertInstanceof(point, ol.geom.Point);
+ point.setCoordinates(coordinates);
}
if (this.sketchLayer_.getStyle() !== style) {
this.sketchLayer_.setStyle(style);
@@ -505,6 +506,7 @@ ol.interaction.Modify.prototype.insertVertex_ =
var segment = segmentData.segment;
var feature = segmentData.feature;
var geometry = segmentData.geometry;
+ goog.asserts.assertInstanceof(geometry, ol.geom.LineString);
var index = segmentData.index;
var coordinates = geometry.getCoordinates();
coordinates.splice(index + 1, 0, vertex);
diff --git a/old/src/ol/renderer/canvas/canvasvectorrenderer.js b/old/src/ol/renderer/canvas/canvasvectorrenderer.js
index 47635e516a..b3573766a6 100644
--- a/old/src/ol/renderer/canvas/canvasvectorrenderer.js
+++ b/old/src/ol/renderer/canvas/canvasvectorrenderer.js
@@ -272,6 +272,7 @@ ol.renderer.canvas.Vector.prototype.renderPointFeatures_ =
}
for (j = 0, jj = components.length; j < jj; ++j) {
point = components[j];
+ goog.asserts.assertInstanceof(point, ol.geom.Point);
vec = [point.get(0), point.get(1), 0];
goog.vec.Mat4.multVec3(this.transform_, vec, vec);
context.drawImage(content, Math.round(vec[0] + xOffset),
@@ -404,6 +405,7 @@ ol.renderer.canvas.Vector.prototype.renderPolygonFeatures_ =
}
for (j = 0, jj = components.length; j < jj; ++j) {
poly = components[j];
+ goog.asserts.assertInstanceof(poly, ol.geom.Polygon);
rings = poly.getRings();
numRings = rings.length;
if (numRings > 0) {
@@ -535,9 +537,11 @@ ol.renderer.canvas.Vector.getLabelVectors = function(geometry) {
}
var type = geometry.getType();
if (type == ol.geom.GeometryType.POINT) {
+ goog.asserts.assertInstanceof(geometry, ol.geom.Point);
return [[geometry.get(0), geometry.get(1), 0]];
}
if (type == ol.geom.GeometryType.POLYGON) {
+ goog.asserts.assertInstanceof(geometry, ol.geom.Polygon);
var coordinates = geometry.getInteriorPoint();
return [[coordinates[0], coordinates[1], 0]];
}
diff --git a/old/test/spec/ol/geom/geometry.test.js b/old/test/spec/ol/geom/geometry.test.js
index a2898d1fe8..298e6564b0 100644
--- a/old/test/spec/ol/geom/geometry.test.js
+++ b/old/test/spec/ol/geom/geometry.test.js
@@ -6,7 +6,7 @@ describe('ol.geom.Geometry', function() {
it('creates a new geometry', function() {
var geom = new ol.geom.Geometry();
expect(geom).to.be.a(ol.geom.Geometry);
- expect(geom).to.be.a(goog.events.EventTarget);
+ expect(geom).to.be.a(ol.Observable);
});
});
@@ -26,27 +26,6 @@ describe('ol.geom.Geometry', function() {
});
-describe('ol.geom.GeometryEvent', function() {
-
- describe('constructor', function() {
-
- it('creates a new event', function() {
- var point = new ol.geom.Point([1, 2]);
- var bounds = point.getBounds();
- var evt = new ol.geom.GeometryEvent('change', point, bounds);
- expect(evt).to.be.a(ol.geom.GeometryEvent);
- expect(evt).to.be.a(goog.events.Event);
- expect(evt.target).to.be(point);
- expect(evt.oldExtent).to.be(bounds);
- });
-
- });
-
-});
-
-goog.require('goog.events.Event');
-goog.require('goog.events.EventTarget');
+goog.require('ol.Observable');
goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryEvent');
-goog.require('ol.geom.Point');
goog.require('ol.geom.LineString');
diff --git a/old/test/spec/ol/geom/linestring.test.js b/old/test/spec/ol/geom/linestring.test.js
index 627adcbd36..a4e4c2275f 100644
--- a/old/test/spec/ol/geom/linestring.test.js
+++ b/old/test/spec/ol/geom/linestring.test.js
@@ -53,7 +53,6 @@ describe('ol.geom.LineString', function() {
expect(line.getBounds()).to.eql([10, 20, 30, 40]);
goog.events.listen(line, 'change', function(evt) {
expect(evt.target).to.equal(line);
- expect(evt.oldExtent).to.eql([10, 20, 30, 40]);
expect(evt.target.getBounds()).to.eql([30, 40, 50, 60]);
expect(evt.target.getCoordinates()).to.eql([[30, 40], [50, 60]]);
done();
diff --git a/old/test/spec/ol/geom/multipolygon.test.js b/old/test/spec/ol/geom/multipolygon.test.js
index 1f7976c1c7..a3d444a434 100644
--- a/old/test/spec/ol/geom/multipolygon.test.js
+++ b/old/test/spec/ol/geom/multipolygon.test.js
@@ -81,10 +81,8 @@ describe('ol.geom.MultiPolygon', function() {
it('is fired when outer ring is modified', function(done) {
var multi = new ol.geom.MultiPolygon([[outer, inner], [outer, inner]]);
var components = multi.getComponents();
- var bounds = multi.getBounds();
goog.events.listen(multi, 'change', function(evt) {
expect(evt.target).to.be(multi);
- expect(evt.oldExtent).to.eql(bounds);
expect(evt.target.getBounds()).to.eql([0, 0, 11, 10]);
done();
});
@@ -98,10 +96,8 @@ describe('ol.geom.MultiPolygon', function() {
it('is fired when inner ring is modified', function(done) {
var multi = new ol.geom.MultiPolygon([[outer, inner], [outer, inner]]);
var components = multi.getComponents();
- var bounds = multi.getBounds();
goog.events.listen(multi, 'change', function(evt) {
expect(evt.target).to.be(multi);
- expect(evt.oldExtent).to.eql(bounds);
expect(evt.target.getBounds()).to.eql([0, 0, 10, 10]);
done();
});
diff --git a/old/test/spec/ol/geom/point.test.js b/old/test/spec/ol/geom/point.test.js
index dda5bc9014..a56e9b0a5b 100644
--- a/old/test/spec/ol/geom/point.test.js
+++ b/old/test/spec/ol/geom/point.test.js
@@ -53,7 +53,6 @@ describe('ol.geom.Point', function() {
expect(point.getBounds()).to.eql([10, 20, 10, 20]);
goog.events.listen(point, 'change', function(evt) {
expect(evt.target).to.equal(point);
- expect(evt.oldExtent).to.eql([10, 20, 10, 20]);
expect(evt.target.getBounds()).to.eql([30, 40, 30, 40]);
expect(evt.target.getCoordinates()).to.eql([30, 40]);
done();
diff --git a/old/test/spec/ol/geom/polygon.test.js b/old/test/spec/ol/geom/polygon.test.js
index d80ed15598..e8b5c9cdfa 100644
--- a/old/test/spec/ol/geom/polygon.test.js
+++ b/old/test/spec/ol/geom/polygon.test.js
@@ -143,10 +143,8 @@ describe('ol.geom.Polygon', function() {
it('is fired when outer ring is modified', function(done) {
var poly = new ol.geom.Polygon([outer, inner]);
var rings = poly.getRings();
- var bounds = poly.getBounds();
goog.events.listen(poly, 'change', function(evt) {
expect(evt.target).to.be(poly);
- expect(evt.oldExtent).to.eql(bounds);
expect(evt.target.getBounds()).to.eql([0, 0, 11, 10]);
done();
});
@@ -159,10 +157,8 @@ describe('ol.geom.Polygon', function() {
it('is fired when inner ring is modified', function(done) {
var poly = new ol.geom.Polygon([outer, inner]);
var rings = poly.getRings();
- var bounds = poly.getBounds();
goog.events.listen(poly, 'change', function(evt) {
expect(evt.target).to.be(poly);
- expect(evt.oldExtent).to.eql(bounds);
expect(evt.target.getBounds()).to.eql([0, 0, 10, 10]);
done();
});
diff --git a/src/ol/browserfeature.exports b/src/ol/browserfeature.exports
new file mode 100644
index 0000000000..45cb41ac8a
--- /dev/null
+++ b/src/ol/browserfeature.exports
@@ -0,0 +1,3 @@
+@exportSymbol ol.BrowserFeature
+@exportProperty ol.BrowserFeature.DEVICE_PIXEL_RATIO
+@exportProperty ol.BrowserFeature.HAS_TOUCH