diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-24 09:06:04 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-24 09:06:04 +0000 |
commit | bc89882970d6a14b1f72eb9c715fae90b26d066c (patch) | |
tree | f5cb59d5130d7585980eb39437071e07ebc12f87 /app/assets/javascripts/commit/image_file.js | |
parent | 4a45a787703cb78c6101750cfbdc9f656b934b42 (diff) | |
download | gitlab-ce-bc89882970d6a14b1f72eb9c715fae90b26d066c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/commit/image_file.js')
-rw-r--r-- | app/assets/javascripts/commit/image_file.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/assets/javascripts/commit/image_file.js b/app/assets/javascripts/commit/image_file.js index 9454f760df8..0e031de0dbc 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-return-assign, no-unused-expressions, no-sequences */ +/* eslint-disable func-names, no-var, no-else-return, consistent-return, prefer-template, one-var, no-return-assign, no-unused-expressions, no-sequences */ import $ from 'jquery'; @@ -13,14 +13,14 @@ export default class ImageFile { $('.two-up.view .frame.deleted img', this.file), (function(_this) { return function() { - return _this.requestImageInfo($('.two-up.view .frame.added img', _this.file), function() { + return _this.requestImageInfo($('.two-up.view .frame.added img', _this.file), () => { _this.initViewModes(); // Load two-up view after images are loaded // so that we can display the correct width and height information const $images = $('.two-up.view img', _this.file); - $images.waitForImages(function() { + $images.waitForImages(() => { _this.initView('two-up'); }); }); @@ -138,7 +138,7 @@ export default class ImageFile { return $(this).width(availWidth / 2); } }); - return _this.requestImageInfo($('img', wrap), function(width, height) { + return _this.requestImageInfo($('img', wrap), (width, height) => { $('.image-info .meta-width', wrap).text(width + 'px'); $('.image-info .meta-height', wrap).text(height + 'px'); return $('.image-info', wrap).removeClass('hide'); @@ -175,7 +175,7 @@ export default class ImageFile { wrapPadding = parseInt($swipeWrap.css('right').replace('px', ''), 10); - _this.initDraggable($swipeBar, wrapPadding, function(e, left) { + _this.initDraggable($swipeBar, wrapPadding, (e, left) => { if (left > 0 && left < $swipeFrame.width() - wrapPadding * 2) { $swipeWrap.width(maxWidth + 1 - left); $swipeBar.css('left', left); @@ -215,7 +215,7 @@ export default class ImageFile { $frameAdded.css('opacity', 1); framePadding = parseInt($frameAdded.css('right').replace('px', ''), 10); - _this.initDraggable($dragger, framePadding, function(e, left) { + _this.initDraggable($dragger, framePadding, (e, left) => { var opacity = left / dragTrackWidth; if (opacity >= 0 && opacity <= 1) { |