diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-16 12:06:26 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-16 12:06:26 +0000 |
commit | d2798d607e11e0ebae83ae909404834388733428 (patch) | |
tree | 096b7f4d4bdb315d28cdcd4d6db4e80911112e9c /app/assets/javascripts/commit | |
parent | d8211a0ed119eada7d292e974a8fc7b0cd982d3c (diff) | |
download | gitlab-ce-d2798d607e11e0ebae83ae909404834388733428.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/commit')
-rw-r--r-- | app/assets/javascripts/commit/image_file.js | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/app/assets/javascripts/commit/image_file.js b/app/assets/javascripts/commit/image_file.js index bc666aef54b..9454f760df8 100644 --- a/app/assets/javascripts/commit/image_file.js +++ b/app/assets/javascripts/commit/image_file.js @@ -1,4 +1,4 @@ -/* eslint-disable func-names, no-var, prefer-arrow-callback, no-else-return, consistent-return, prefer-template, one-var, no-unused-vars, no-return-assign, no-unused-expressions, no-sequences */ +/* eslint-disable func-names, no-var, prefer-arrow-callback, no-else-return, consistent-return, prefer-template, one-var, no-return-assign, no-unused-expressions, no-sequences */ import $ from 'jquery'; @@ -12,11 +12,8 @@ export default class ImageFile { this.requestImageInfo( $('.two-up.view .frame.deleted img', this.file), (function(_this) { - return function(deletedWidth, deletedHeight) { - return _this.requestImageInfo($('.two-up.view .frame.added img', _this.file), function( - width, - height, - ) { + return function() { + return _this.requestImageInfo($('.two-up.view .frame.added img', _this.file), function() { _this.initViewModes(); // Load two-up view after images are loaded @@ -112,7 +109,7 @@ export default class ImageFile { maxHeight = 0; $('.frame', view) .each( - (function(_this) { + (function() { return function(index, frame) { var height, width; width = $(frame).width(); @@ -196,13 +193,7 @@ export default class ImageFile { return $('.onion-skin.view', this.file).each( (function(_this) { return function(index, view) { - var $frame, - $track, - $dragger, - $frameAdded, - framePadding, - ref, - dragging = false; + var $frame, $track, $dragger, $frameAdded, framePadding, ref; (ref = _this.prepareFrames(view)), ([maxWidth, maxHeight] = ref); $frame = $('.onion-skin-frame', view); $frameAdded = $('.frame.added', view); |