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
299e2384
Commit
299e2384
authored
Sep 09, 2014
by
Marc Duez
Browse files
model.js : improve selection / multi-selection speed
remove selection limit
parent
49af63f5
Changes
3
Hide whitespace changes
Inline
Side-by-side
browser/js/model.js
View file @
299e2384
...
...
@@ -1370,9 +1370,6 @@ Model.prototype = {
*
* */
select
:
function
(
cloneID
)
{
var
list
=
this
.
getSelected
();
myConsole
.
log
(
"
select() (clone
"
+
cloneID
+
"
)
"
);
if
(
cloneID
==
(
this
.
n_windows
-
1
))
return
0
...
...
@@ -1380,15 +1377,28 @@ Model.prototype = {
if
(
this
.
windows
[
cloneID
].
select
)
{
return
;
}
else
{
if
(
list
.
length
<
20
)
{
this
.
windows
[
cloneID
].
select
=
true
;
this
.
addClonesSelected
(
cloneID
);
this
.
windows
[
cloneID
].
select
=
true
;
this
.
addClonesSelected
(
cloneID
);
}
}
this
.
lastCloneSelected
=
cloneID
;
this
.
updateElemStyle
([
cloneID
]);
this
.
updateAlignmentButton
();
},
multiSelect
:
function
(
list
)
{
myConsole
.
log
(
"
select() (clone
"
+
list
+
"
)
"
);
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
){
this
.
windows
[
list
[
i
]].
select
=
true
;
this
.
addClonesSelected
(
list
[
i
]);
}
this
.
lastCloneSelected
=
list
[
0
];
this
.
updateElemStyle
(
list
);
this
.
updateAlignmentButton
();
},
/* kick a clone out of the selection
*
...
...
browser/js/scatterPlot.js
View file @
299e2384
...
...
@@ -1777,9 +1777,7 @@ ScatterPlot.prototype = {
this
.
active_selector
=
false
;
if
(
!
d3
.
event
.
ctrlKey
)
this
.
m
.
unselectAll
()
for
(
var
i
=
0
;
i
<
nodes_selected
.
length
;
i
++
)
{
this
.
m
.
select
(
nodes_selected
[
i
])
}
this
.
m
.
multiSelect
(
nodes_selected
)
}
}
}
...
...
browser/js/segmenter.js
View file @
299e2384
...
...
@@ -156,6 +156,7 @@ Segment.prototype = {
curH
=
seg
.
height
(),
autoH
=
seg
.
css
(
'
height
'
,
'
auto
'
).
height
();
if
(
autoH
>
100
){
if
(
autoH
>
500
)
autoH
=
500
seg
.
stop
().
height
(
curH
).
animate
({
height
:
autoH
+
5
},
250
);
}
else
{
seg
.
stop
().
height
(
curH
)
...
...
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