Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
31b98f86
Commit
31b98f86
authored
Mar 25, 2021
by
marc duez
Committed by
Mathieu Giraud
Apr 01, 2021
Browse files
aligner.js : code quality
parent
7789fc5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/js/aligner.js
View file @
31b98f86
...
...
@@ -114,10 +114,7 @@ Aligner.prototype = {
menu
.
appendChild
(
axis_label
);
$
(
axis_input
).
unbind
(
"
click
"
);
$
(
axis_input
).
click
(
function
(
e
)
{
self
.
updateAxisBox
();
e
.
stopPropagation
();
})
self
.
connect_axisbox
(
axis_input
);
}
this
.
selectedAxis
=
[
Axis
.
prototype
.
getAxisProperties
(
"
productivity IMGT
"
),
...
...
@@ -126,22 +123,26 @@ Aligner.prototype = {
},
//check axis selected in menu to update and update axisBox dom elements accordingly
updateA
xis
B
ox
:
function
(){
connect_a
xis
b
ox
:
function
(
elem
){
var
self
=
this
;
var
menu
=
document
.
getElementById
(
"
segmenter_axis_select
"
);
var
inputs
=
menu
.
getElementsByTagName
(
"
input
"
);
var
selectedAxis
=
[];
for
(
var
i
in
inputs
)
if
(
inputs
[
i
].
checked
)
selectedAxis
.
push
(
Axis
.
prototype
.
getAxisProperties
(
inputs
[
i
].
value
));
if
(
selectedAxis
.
length
<=
5
){
self
.
selectedAxis
=
selectedAxis
;
self
.
update
();
}
else
{
console
.
log
({
msg
:
"
selection is limited to 5
"
,
type
:
"
flash
"
,
priority
:
2
});
this
.
checked
=
false
;
}
$
(
elem
).
click
(
function
(
e
)
{
var
menu
=
document
.
getElementById
(
"
segmenter_axis_select
"
);
var
inputs
=
menu
.
getElementsByTagName
(
"
input
"
);
var
selectedAxis
=
[];
for
(
var
i
in
inputs
)
if
(
inputs
[
i
].
checked
)
selectedAxis
.
push
(
Axis
.
prototype
.
getAxisProperties
(
inputs
[
i
].
value
));
if
(
selectedAxis
.
length
<=
5
){
self
.
selectedAxis
=
selectedAxis
;
self
.
update
();
}
else
{
console
.
log
({
msg
:
"
selection is limited to 5
"
,
type
:
"
flash
"
,
priority
:
2
});
this
.
checked
=
false
;
}
e
.
stopPropagation
();
})
},
connect_checkbox
:
function
(
elem
,
layers
){
...
...
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