Allow replaying with null transform
This commit is contained in:
@@ -89,7 +89,7 @@ ol.render.canvas.Replay = function(tolerance, maxExtent, resolution, overlaps) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {ol.Transform}
|
* @type {!ol.Transform}
|
||||||
*/
|
*/
|
||||||
this.renderedTransform_ = ol.transform.create();
|
this.renderedTransform_ = ol.transform.create();
|
||||||
|
|
||||||
@@ -103,17 +103,17 @@ ol.render.canvas.Replay = function(tolerance, maxExtent, resolution, overlaps) {
|
|||||||
* @private
|
* @private
|
||||||
* @type {Array.<number>}
|
* @type {Array.<number>}
|
||||||
*/
|
*/
|
||||||
this.pixelCoordinates_ = [];
|
this.pixelCoordinates_ = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {ol.Transform}
|
* @type {!ol.Transform}
|
||||||
*/
|
*/
|
||||||
this.tmpLocalTransform_ = ol.transform.create();
|
this.tmpLocalTransform_ = ol.transform.create();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {ol.Transform}
|
* @type {!ol.Transform}
|
||||||
*/
|
*/
|
||||||
this.resetTransform_ = ol.transform.create();
|
this.resetTransform_ = ol.transform.create();
|
||||||
};
|
};
|
||||||
@@ -229,9 +229,12 @@ ol.render.canvas.Replay.prototype.replay_ = function(
|
|||||||
instructions, featureCallback, opt_hitExtent) {
|
instructions, featureCallback, opt_hitExtent) {
|
||||||
/** @type {Array.<number>} */
|
/** @type {Array.<number>} */
|
||||||
var pixelCoordinates;
|
var pixelCoordinates;
|
||||||
if (ol.array.equals(transform, this.renderedTransform_)) {
|
if (this.pixelCoordinates_ && ol.array.equals(transform, this.renderedTransform_)) {
|
||||||
pixelCoordinates = this.pixelCoordinates_;
|
pixelCoordinates = this.pixelCoordinates_;
|
||||||
} else {
|
} else {
|
||||||
|
if (!this.pixelCoordinates_) {
|
||||||
|
this.pixelCoordinates_ = [];
|
||||||
|
}
|
||||||
pixelCoordinates = ol.geom.flat.transform.transform2D(
|
pixelCoordinates = ol.geom.flat.transform.transform2D(
|
||||||
this.coordinates, 0, this.coordinates.length, 2,
|
this.coordinates, 0, this.coordinates.length, 2,
|
||||||
transform, this.pixelCoordinates_);
|
transform, this.pixelCoordinates_);
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ ol.MapOptionsInternal;
|
|||||||
/**
|
/**
|
||||||
* An array representing an affine 2d transformation for use with
|
* An array representing an affine 2d transformation for use with
|
||||||
* {@link ol.transform} functions. The array has 6 elements.
|
* {@link ol.transform} functions. The array has 6 elements.
|
||||||
* @typedef {Array.<number>}
|
* @typedef {!Array.<number>}
|
||||||
*/
|
*/
|
||||||
ol.Transform;
|
ol.Transform;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user