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
7355fd5e
Commit
7355fd5e
authored
Apr 08, 2017
by
Mathieu Giraud
Browse files
js/model.js: break(), break the given clusters
parent
49ba914b
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/js/model.js
View file @
7355fd5e
...
...
@@ -1263,9 +1263,35 @@ changeCloneNotation: function(cloneNotationType) {
this
.
update
()
},
/**
* break the given clusters into 1-clone clusters
* @param {integer list} clusters
* */
break
:
function
(
clusters
)
{
console
.
log
(
"
break(
"
+
clusters
+
"
)
"
)
if
(
clusters
==
undefined
)
clusters
=
this
.
getSelected
();
console
.
log
(
"
break(
"
+
clusters
+
"
)
"
)
this
.
saveClusters
()
for
(
var
i
=
0
;
i
<
clusters
.
length
;
i
++
)
{
var
list
=
this
.
clusters
[
clusters
[
i
]]
console
.
log
(
"
b
"
+
list
)
for
(
var
j
=
0
;
j
<
list
.
length
;
j
++
)
{
this
.
clusters
[
list
[
j
]]
=
[
list
[
j
]]
}
this
.
updateElem
(
list
);
}
},
/**
* re
set
clusters to default 1-clone
s
clusters
*
b
re
ak all
clusters to default 1-clone clusters
* */
resetClusters
:
function
()
{
this
.
saveClusters
()
...
...
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