Allow z index to be undefined

This commit is contained in:
Tom Payne
2013-11-08 03:03:43 +01:00
parent c658460c09
commit 91c448d63d
3 changed files with 3 additions and 3 deletions

View File

@@ -325,7 +325,7 @@ ol.replay.canvas.BatchGroup.prototype.finish = function() {
* @inheritDoc
*/
ol.replay.canvas.BatchGroup.prototype.getBatch = function(zIndex, batchType) {
var zIndexKey = zIndex.toString();
var zIndexKey = goog.isDef(zIndex) ? zIndex.toString() : '0';
var batches = this.batchesByZIndex_[zIndexKey];
if (!goog.isDef(batches)) {
batches = {};

View File

@@ -64,7 +64,7 @@ ol.replay.IBatchGroup.prototype.finish = function() {
/**
* @param {number} zIndex Z index.
* @param {number|undefined} zIndex Z index.
* @param {ol.replay.BatchType} batchType Batch type.
* @return {ol.replay.IBatch} Batch.
*/

View File

@@ -62,7 +62,7 @@ ol.style.stroke.equals = function(strokeStyle1, strokeStyle2) {
* @typedef {{fill: ?ol.style.Fill,
* image: ?ol.style.Image,
* stroke: ?ol.style.Stroke,
* zIndex: number}}
* zIndex: (number|undefined)}}
*/
ol.style.Style;