summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/commit
diff options
context:
space:
mode:
authorJared Deckard <jared.deckard@gmail.com>2016-07-26 22:32:10 -0500
committerJared Deckard <jared.deckard@gmail.com>2016-09-08 12:23:12 -0500
commit7f6474b269a5cfa454d28c0c0da969490c9eb33e (patch)
treeaafe7df9bc2683712a466595a046adb57e222565 /app/assets/javascripts/commit
parent4c833a1d4ead49c27f6a81e607d10a5c6f0fcc2b (diff)
downloadgitlab-ce-7f6474b269a5cfa454d28c0c0da969490c9eb33e.tar.gz
Restore comments lost when converting CoffeeScript to JavaScript
Diffstat (limited to 'app/assets/javascripts/commit')
-rw-r--r--app/assets/javascripts/commit/image-file.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/assets/javascripts/commit/image-file.js b/app/assets/javascripts/commit/image-file.js
index c0d0b2d049f..e893491b19b 100644
--- a/app/assets/javascripts/commit/image-file.js
+++ b/app/assets/javascripts/commit/image-file.js
@@ -2,6 +2,7 @@
this.ImageFile = (function() {
var prepareFrames;
+ // Width where images must fits in, for 2-up this gets divided by 2
ImageFile.availWidth = 900;
ImageFile.viewModes = ['two-up', 'swipe'];
@@ -9,6 +10,7 @@
function ImageFile(file) {
this.file = file;
this.requestImageInfo($('.two-up.view .frame.deleted img', this.file), (function(_this) {
+ // Determine if old and new file has same dimensions, if not show 'two-up' view
return function(deletedWidth, deletedHeight) {
return _this.requestImageInfo($('.two-up.view .frame.added img', _this.file), function(width, height) {
if (width === deletedWidth && height === deletedHeight) {