Add index to frame state

This commit is contained in:
Tom Payne
2013-04-18 14:15:06 +02:00
parent 1c4d2956ac
commit 8fef7b9edd
2 changed files with 8 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ goog.require('ol.layer.LayerState');
* coordinateToPixelMatrix: goog.vec.Mat4.Number,
* extent: (null|ol.Extent),
* focus: ol.Coordinate,
* index: number,
* layersArray: Array.<ol.layer.Layer>,
* layerStates: Object.<number, ol.layer.LayerState>,
* logos: Object.<string, boolean>,

View File

@@ -168,6 +168,12 @@ ol.Map = function(options) {
*/
this.pixelToCoordinateMatrix_ = goog.vec.Mat4.createNumber();
/**
* @private
* @type {number}
*/
this.frameIndex_ = 0;
/**
* @private
* @type {?ol.FrameState}
@@ -804,6 +810,7 @@ ol.Map.prototype.renderFrame_ = function(time) {
coordinateToPixelMatrix: this.coordinateToPixelMatrix_,
extent: null,
focus: goog.isNull(this.focus_) ? view2DState.center : this.focus_,
index: this.frameIndex_++,
layersArray: layersArray,
layerStates: layerStates,
logos: {},