Use inherited dispatchChangeEvent and getRevision in ol.geom.Geometry

This commit is contained in:
Tom Payne
2014-01-21 11:43:08 +01:00
parent 911cb302e8
commit edcb38232f
10 changed files with 26 additions and 50 deletions

View File

@@ -56,10 +56,10 @@ ol.geom.LineString.prototype.closestPointXY =
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
}
if (this.maxDeltaRevision_ != this.revision) {
if (this.maxDeltaRevision_ != this.getRevision()) {
this.maxDelta_ = Math.sqrt(ol.geom.closest.getMaxSquaredDelta(
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));
this.maxDeltaRevision_ = this.revision;
this.maxDeltaRevision_ = this.getRevision();
}
return ol.geom.closest.getClosestPoint(
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,