Permalink
Browse files

Fix slideshow JS for latest REST API changes

  • Loading branch information...
autarch committed Aug 19, 2012
1 parent f2e8d77 commit b9e8cf86e661b9c6cae61187e6ecbcb1d1c987ee
Showing with 6 additions and 6 deletions.
  1. +6 −6 share/js-source/VegGuide/EntryImageSlideshow.js
@@ -107,18 +107,18 @@ VegGuide.EntryImageSlideshow.prototype._showImage = function (imageNumber) {
var img = document.createElement("img");
- img.src = image.sizes[2].uri;
+ img.src = image.files[2].uri;
img.alt = "";
- img.height = image.sizes[2].height;
- img.width = image.sizes[2].width;
+ img.height = image.files[2].height;
+ img.width = image.files[2].width;
img.style.marginTop = image.margin_top;
img.style.marginLeft = image.margin_left;
this._emptyElt( this.imageContainer );
var link = document.createElement("a");
link.title = "View the full size image";
- link.href = image.sizes[3].uri;
+ link.href = image.files[3].uri;
link.target = "_new";
link.appendChild(img);
@@ -186,8 +186,8 @@ VegGuide.EntryImageSlideshow.prototype._getImage = function (imageNumber) {
var container_height = this.imageContainer.offsetHeight;
var container_width = this.lb.content.offsetWidth;
- image.margin_top = ( ( container_height - image.sizes[2].height ) / 2 ) + "px";
- image.margin_left = ( ( container_width - image.sizes[2].width ) / 2 ) + "px";
+ image.margin_top = ( ( container_height - image.files[2].height ) / 2 ) + "px";
+ image.margin_left = ( ( container_width - image.files[2].width ) / 2 ) + "px";
this.images[ imageNumber - 1 ] = image;
}

0 comments on commit b9e8cf8

Please sign in to comment.