changed indexOfImage to colorIndex

This commit is contained in:
Peter 2017-07-31 17:43:10 -04:00
parent f268607b54
commit 910eaf6da6

View File

@ -490,13 +490,13 @@ $.Drawer.prototype = {
return; return;
} }
var indexOfImage = this.viewer.world.getIndexOfItem(tiledImage) % this.debugGridColor.length; var colorIndex = this.viewer.world.getIndexOfItem(tiledImage) % this.debugGridColor.length;
var context = this.context; var context = this.context;
context.save(); context.save();
context.lineWidth = 2 * $.pixelDensityRatio; context.lineWidth = 2 * $.pixelDensityRatio;
context.font = 'small-caps bold ' + (13 * $.pixelDensityRatio) + 'px arial'; context.font = 'small-caps bold ' + (13 * $.pixelDensityRatio) + 'px arial';
context.strokeStyle = this.debugGridColor[indexOfImage]; context.strokeStyle = this.debugGridColor[colorIndex];
context.fillStyle = this.debugGridColor[indexOfImage]; context.fillStyle = this.debugGridColor[colorIndex];
if ( this.viewport.degrees !== 0 ) { if ( this.viewport.degrees !== 0 ) {
this._offsetForRotation({degrees: this.viewport.degrees}); this._offsetForRotation({degrees: this.viewport.degrees});