Remove ol.geom.GeometryEvent
This removes geometry specific change events. Since geometries are mere observables, we only get generic change events. To minimize changes in other places, as a workaround, we cache geometry bounds on features. This is not the way things should be long term, but the objective is to remove the geometry specific event.
This commit is contained in:
@@ -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('ol.Observable');
|
||||
goog.require('ol.geom.Geometry');
|
||||
goog.require('ol.geom.GeometryEvent');
|
||||
goog.require('ol.geom.Point');
|
||||
goog.require('ol.geom.LineString');
|
||||
|
||||
Reference in New Issue
Block a user