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
iv
gitlab-ce
Commits
c0d312be
Commit
c0d312be
authored
Mar 07, 2013
by
Sato Hiroyuki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor: Removing a if statement, because the nil value is already removed in the view template.
parent
b7e5f455
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
49 deletions
+47
-49
app/assets/javascripts/branch-graph.js
app/assets/javascripts/branch-graph.js
+47
-49
No files found.
app/assets/javascripts/branch-graph.js
View file @
c0d312be
...
...
@@ -118,58 +118,56 @@
for
(
var
j
=
0
,
jj
=
this
.
commits
[
i
].
parents
.
length
;
j
<
jj
;
j
++
)
{
c
=
this
.
preparedCommits
[
this
.
commits
[
i
].
parents
[
j
][
0
]];
ps
=
this
.
commits
[
i
].
parents
[
j
][
1
];
if
(
c
)
{
var
cx
=
offsetX
+
20
*
c
.
time
,
cy
=
offsetY
+
10
*
c
.
space
,
psy
=
offsetY
+
10
*
ps
;
if
(
c
.
space
==
this
.
commits
[
i
].
space
&&
c
.
space
==
ps
)
{
r
.
path
([
"
M
"
,
x
,
y
,
"
L
"
,
cx
,
cy
]).
attr
({
stroke
:
this
.
colors
[
c
.
space
],
"
stroke-width
"
:
2
});
var
cx
=
offsetX
+
20
*
c
.
time
,
cy
=
offsetY
+
10
*
c
.
space
,
psy
=
offsetY
+
10
*
ps
;
if
(
c
.
space
==
this
.
commits
[
i
].
space
&&
c
.
space
==
ps
)
{
r
.
path
([
"
M
"
,
x
,
y
,
"
L
"
,
cx
,
cy
]).
attr
({
stroke
:
this
.
colors
[
c
.
space
],
"
stroke-width
"
:
2
});
}
else
if
(
c
.
space
<
this
.
commits
[
i
].
space
)
{
if
(
y
==
psy
)
{
r
.
path
([
"
M
"
,
x
-
5
,
y
,
"
l-5,-2,0,4,5,-2
"
,
"
L
"
,
x
-
10
,
y
,
"
L
"
,
x
-
15
,
psy
,
"
L
"
,
cx
+
5
,
psy
,
"
L
"
,
cx
,
cy
])
.
attr
({
stroke
:
this
.
colors
[
this
.
commits
[
i
].
space
],
"
stroke-width
"
:
2
});
}
else
{
r
.
path
([
"
M
"
,
x
-
3
,
y
-
6
,
"
l-4,-3,4,-2,0,5
"
,
"
L
"
,
x
-
5
,
y
-
10
,
"
L
"
,
x
-
10
,
psy
,
"
L
"
,
cx
+
5
,
psy
,
"
L
"
,
cx
,
cy
])
.
attr
({
stroke
:
this
.
colors
[
this
.
commits
[
i
].
space
],
"
stroke-width
"
:
2
});
}
}
else
if
(
c
.
space
<
this
.
commits
[
i
].
space
)
{
if
(
y
==
psy
)
{
r
.
path
([
"
M
"
,
x
-
5
,
y
,
"
l-5,-2,0,4,5,-2
"
,
"
L
"
,
x
-
10
,
y
,
"
L
"
,
x
-
15
,
psy
,
"
L
"
,
cx
+
5
,
psy
,
"
L
"
,
cx
,
cy
])
.
attr
({
stroke
:
this
.
colors
[
this
.
commits
[
i
].
space
],
"
stroke-width
"
:
2
});
}
else
{
r
.
path
([
"
M
"
,
x
-
3
,
y
+
6
,
"
l-4,3,4,2,0,-
5
"
,
"
L
"
,
x
-
5
,
y
+
10
,
"
L
"
,
x
-
10
,
psy
,
"
L
"
,
cx
+
5
,
psy
,
"
L
"
,
cx
,
cy
])
.
attr
({
stroke
:
this
.
colors
[
c
.
space
],
"
stroke-width
"
:
2
});
r
.
path
([
"
M
"
,
x
-
3
,
y
-
6
,
"
l-4,-3,4,-2,0,
5
"
,
"
L
"
,
x
-
5
,
y
-
10
,
"
L
"
,
x
-
10
,
psy
,
"
L
"
,
cx
+
5
,
psy
,
"
L
"
,
cx
,
cy
])
.
attr
({
stroke
:
this
.
colors
[
this
.
commits
[
i
]
.
space
],
"
stroke-width
"
:
2
});
}
}
else
{
r
.
path
([
"
M
"
,
x
-
3
,
y
+
6
,
"
l-4,3,4,2,0,-5
"
,
"
L
"
,
x
-
5
,
y
+
10
,
"
L
"
,
x
-
10
,
psy
,
"
L
"
,
cx
+
5
,
psy
,
"
L
"
,
cx
,
cy
])
.
attr
({
stroke
:
this
.
colors
[
c
.
space
],
"
stroke-width
"
:
2
});
}
}
...
...
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