From 932d26b5ffb1150ba14ec2004849d5c0cdc12506 Mon Sep 17 00:00:00 2001 From: David Valentine Date: Mon, 11 May 2015 14:15:09 -0700 Subject: [PATCH 1/2] Update simpleimage.js missing i < in for loop --- src/views/simpleimage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/simpleimage.js b/src/views/simpleimage.js index 33e73c8..4fd0259 100644 --- a/src/views/simpleimage.js +++ b/src/views/simpleimage.js @@ -87,7 +87,7 @@ PivotViewer.Views.SimpleImageController = PivotViewer.Views.IImageController.sub GetImages: function (id, width, height) { // Only return image if size is big enough if (width > 8 && height > 8) { - for (var i = 0; this._items.length; i++){ + for (var i = 0; i < this._items.length; i++){ if (this._items[i].ImageId == id) { return this._items[i].Images; } From 8b18a7a1502d0f89d021d007e0cfbdf32e129a95 Mon Sep 17 00:00:00 2001 From: David Valentine Date: Fri, 15 May 2015 13:07:31 -0700 Subject: [PATCH 2/2] Small images return function to draw a black box. Small images return function to draw a black box. --- src/views/simpleimage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/simpleimage.js b/src/views/simpleimage.js index 4fd0259..36728a3 100644 --- a/src/views/simpleimage.js +++ b/src/views/simpleimage.js @@ -93,7 +93,11 @@ PivotViewer.Views.SimpleImageController = PivotViewer.Views.IImageController.sub } } } - return null; + return function (facetItem, context, x, y, width, height) { + context.beginPath(); + context.fillStyle = "Black"; + context.fillRect(x, y, width, height); + }; }, GetWidthForImage: function( id, height ) { for (var i = 0; i < this._items.length; i++) {