Show More
@@ -42,12 +42,19 b' SimpleImageViewer.prototype.view = funct' | |||||
42 |
|
42 | |||
43 | // When we first enlarge an image, a full image needs to be created |
|
43 | // When we first enlarge an image, a full image needs to be created | |
44 | if (images.length == 1) { |
|
44 | if (images.length == 1) { | |
|
45 | var thumb = images.first(); | |||
|
46 | ||||
|
47 | var width = thumb.attr('data-width'); | |||
|
48 | var height = thumb.attr('data-height'); | |||
|
49 | ||||
45 | var parent = images.first().parent(); |
|
50 | var parent = images.first().parent(); | |
46 | var link = parent.attr('href'); |
|
51 | var link = parent.attr('href'); | |
47 |
|
52 | |||
48 | var fullImg = $('<img />') |
|
53 | var fullImg = $('<img />') | |
49 | .addClass(FULL_IMG_CLASS) |
|
54 | .addClass(FULL_IMG_CLASS) | |
50 |
.attr('src', link) |
|
55 | .attr('src', link) | |
|
56 | .attr('width', width) | |||
|
57 | .attr('height', height); | |||
51 |
|
58 | |||
52 | parent.append(fullImg); |
|
59 | parent.append(fullImg); | |
53 | } |
|
60 | } |
General Comments 0
You need to be logged in to leave comments.
Login now