Commit 2aa27ca6 authored by Vidjil Team's avatar Vidjil Team Committed by Mathieu Giraud
Browse files

model.js: Set read number and top for added clone

The top is set to the highest possible value to ensure
that the clone will be visible.

The number of clones is set to a large arbitrary value.
May it happen that the clone doesn't appear because this
value would not be large enough?

Commit performed in trio-programming: @tydax @RyanHerb @mikael-s
parent 54b2029e
......@@ -33,6 +33,8 @@
VIDJIL_JSON_VERSION = '2014.09';
SIZE_MANUALLY_ADDED_CLONE = 100000; // Default size of a manually added clone.
/** Model constructor
* Used to parse a .vidjil file (local file or from url) and store his content in a more convenient way, <br>
* provide manipulation function, <br>
......@@ -2357,6 +2359,10 @@ changeCloneNotation: function(cloneNotationType) {
data.clones.forEach(function (clone) {
clone.quantifiable = false;
var clone = new Clone(clone, self, index);
// Array with self.sample.number times the same value
clone.reads = Array.apply(null, Array(self.samples.number))
.map(function(){return SIZE_MANUALLY_ADDED_CLONE})
clone.top = 1
self.mapID[clone.id] = index;
index++;
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment