Negative start range indices are not supported
Opened this issue · 0 comments
mccalluc commented
- web_bundle version: v0.0.1
- browser version: FF 47.0.1
- OS: Mac OSX 10.11.6
Reproducer:
function demo_5($target) {
var sequence = Array.from(Array(5).keys());
var matrix = Caleydo.d3.parser.parseMatrix(
// times table
sequence.map(function(m){
return sequence.map(function(n){
return m*n;
})
}),
sequence, // row_ids
sequence // col_ids
);
var minus_one = Caleydo.core.range.parse('0:-1, 0:-1');
var minus_one_view = matrix.view(minus_one);
Caleydo.core.multiform.create(minus_one_view, $target[0]);
/*
Behaves as expected:
ID 0 1 2 3 4
0 0 0 0 0 0
1 0 1 2 3 4
2 0 2 4 6 8
3 0 3 6 9 12
4 0 4 8 12 16
*/
var minus_two = Caleydo.core.range.parse('-3:-1, -3:-1');
var minus_two_view = matrix.view(minus_two);
Caleydo.core.multiform.create(minus_two_view, $target[0]);
/*
Returns nothing:
ID
But expected:
ID 2 3 4
2 4 6 8
3 6 9 12
4 8 12 16
*/
}