Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
27c3b09b
Commit
27c3b09b
authored
Feb 05, 2019
by
flothoni
Browse files
model.js; update tests
link to
#3697
parent
a2a5658e
Pipeline
#62010
passed with stages
in 5 minutes and 40 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
browser/js/model.js
View file @
27c3b09b
...
...
@@ -1199,13 +1199,17 @@ changeAlleleNotation: function(alleleNotation) {
displayTop
:
function
(
top
)
{
top
=
typeof
top
!==
'
undefined
'
?
top
:
this
.
top
;
this
.
top
=
top
;
if
(
top
<
0
)
top
=
0
// Remember the top setted
// Allow to keep this values between various samples
this
.
top
=
top
;
// top show cannot be greater than the number of clones
if
(
top
>
this
.
countRealClones
())
top
=
this
.
countRealClones
()
this
.
current_top
=
top
var
html_slider
=
document
.
getElementById
(
'
top_slider
'
);
if
(
html_slider
!==
null
)
{
...
...
browser/test/QUnit/testFiles/model_test.js
View file @
27c3b09b
...
...
@@ -116,7 +116,8 @@ QUnit.test("top clones", function(assert) {
m
.
displayTop
(
-
10
)
assert
.
equal
(
m
.
top
,
0
,
"
Top cannot be negative
"
)
m
.
displayTop
(
m
.
countRealClones
()
*
2
+
10
)
assert
.
equal
(
m
.
top
,
m
.
countRealClones
(),
"
Top cannot be greater than the number of real clones
"
)
assert
.
equal
(
m
.
current_top
,
m
.
countRealClones
(),
"
Top cannot be greater than the number of real clones
"
)
m
.
displayTop
(
1
)
...
...
Write
Preview
Supports
Markdown
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