Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
24a9983d
Commit
24a9983d
authored
Dec 11, 2017
by
Clement Ho
Committed by
Filipa Lacerda
Dec 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix image view mode
parent
cb63a754
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
app/assets/javascripts/commit/image_file.js
app/assets/javascripts/commit/image_file.js
+2
-2
spec/features/merge_requests/image_diff_notes.rb
spec/features/merge_requests/image_diff_notes.rb
+12
-0
No files found.
app/assets/javascripts/commit/image_file.js
View file @
24a9983d
...
...
@@ -121,7 +121,7 @@ export default class ImageFile {
return
$
(
'
.swipe.view
'
,
this
.
file
).
each
((
function
(
_this
)
{
return
function
(
index
,
view
)
{
var
$swipeWrap
,
$swipeBar
,
$swipeFrame
,
wrapPadding
,
ref
;
ref
=
this
.
prepareFrames
(
view
),
maxWidth
=
ref
[
0
],
maxHeight
=
ref
[
1
];
ref
=
_
this
.
prepareFrames
(
view
),
maxWidth
=
ref
[
0
],
maxHeight
=
ref
[
1
];
$swipeFrame
=
$
(
'
.swipe-frame
'
,
view
);
$swipeWrap
=
$
(
'
.swipe-wrap
'
,
view
);
$swipeBar
=
$
(
'
.swipe-bar
'
,
view
);
...
...
@@ -158,7 +158,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
;
ref
=
this
.
prepareFrames
(
view
),
maxWidth
=
ref
[
0
],
maxHeight
=
ref
[
1
];
ref
=
_
this
.
prepareFrames
(
view
),
maxWidth
=
ref
[
0
],
maxHeight
=
ref
[
1
];
$frame
=
$
(
'
.onion-skin-frame
'
,
view
);
$frameAdded
=
$
(
'
.frame.added
'
,
view
);
$track
=
$
(
'
.drag-track
'
,
view
);
...
...
spec/features/merge_requests/image_diff_notes.rb
View file @
24a9983d
...
...
@@ -185,6 +185,18 @@ feature 'image diff notes', :js do
expect
(
page
).
to
have_content
(
diff_note
.
note
)
end
end
describe
'image view modes'
do
before
do
visit
project_commit_path
(
project
,
'2f63565e7aac07bcdadb654e253078b727143ec4'
)
end
it
'resizes image in onion skin view mode'
do
find
(
'.view-modes-menu .onion-skin'
).
click
expect
(
find
(
'.onion-skin-frame'
)[
'style'
]).
to
match
(
'width: 228px; height: 240px;'
)
end
end
end
def
create_image_diff_note
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment