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
Léo-Paul Géneau
gitlab-ce
Commits
0206a7b1
Commit
0206a7b1
authored
Jun 15, 2018
by
Constance Okoghenun
Committed by
Fatih Acet
Jun 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Stop horizontal scrolling when clicking on board issue"
parent
6989a851
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
35 deletions
+0
-35
app/assets/javascripts/boards/components/board.js
app/assets/javascripts/boards/components/board.js
+0
-35
No files found.
app/assets/javascripts/boards/components/board.js
View file @
0206a7b1
/* eslint-disable comma-dangle, space-before-function-paren, one-var */
import
$
from
'
jquery
'
;
import
Sortable
from
'
sortablejs
'
;
import
Vue
from
'
vue
'
;
import
AccessorUtilities
from
'
../../lib/utils/accessor
'
;
...
...
@@ -57,40 +56,6 @@ gl.issueBoards.Board = Vue.extend({
});
},
deep
:
true
,
},
detailIssue
:
{
handler
()
{
if
(
!
Object
.
keys
(
this
.
detailIssue
.
issue
).
length
)
return
;
const
issue
=
this
.
list
.
findIssue
(
this
.
detailIssue
.
issue
.
id
);
if
(
issue
)
{
const
offsetLeft
=
this
.
$el
.
offsetLeft
;
const
boardsList
=
document
.
querySelectorAll
(
'
.boards-list
'
)[
0
];
const
left
=
boardsList
.
scrollLeft
-
offsetLeft
;
let
right
=
(
offsetLeft
+
this
.
$el
.
offsetWidth
);
if
(
window
.
innerWidth
>
768
&&
boardsList
.
classList
.
contains
(
'
is-compact
'
))
{
// -290 here because width of boardsList is animating so therefore
// getting the width here is incorrect
// 290 is the width of the sidebar
right
-=
(
boardsList
.
offsetWidth
-
290
);
}
else
{
right
-=
boardsList
.
offsetWidth
;
}
if
(
right
-
boardsList
.
scrollLeft
>
0
)
{
$
(
boardsList
).
animate
({
scrollLeft
:
right
},
this
.
sortableOptions
.
animation
);
}
else
if
(
left
>
0
)
{
$
(
boardsList
).
animate
({
scrollLeft
:
offsetLeft
},
this
.
sortableOptions
.
animation
);
}
}
},
deep
:
true
}
},
mounted
()
{
...
...
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