Skip to content

Commit

Permalink
Merge pull request #29 from ParasolJS/develop
Browse files Browse the repository at this point in the history
version 1.0.2
  • Loading branch information
joshhjacobson authored Jul 26, 2019
2 parents f0b4e10 + 3360aa4 commit 31fcdae
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 42 deletions.
2 changes: 1 addition & 1 deletion dist/parasol.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/parasol.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

91 changes: 58 additions & 33 deletions dist/parasol.standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -5090,7 +5090,7 @@
var array$3 = Array.prototype;

var map$2 = array$3.map;
var slice$5 = array$3.slice;
var slice$6 = array$3.slice;

var implicit = {name: "implicit"};

Expand All @@ -5099,7 +5099,7 @@
domain = [],
unknown = implicit;

range = range == null ? [] : slice$5.call(range);
range = range == null ? [] : slice$6.call(range);

function scale(d) {
var key = d + "", i = index.get(key);
Expand All @@ -5119,7 +5119,7 @@
};

scale.range = function(_) {
return arguments.length ? (range = slice$5.call(_), scale) : range.slice();
return arguments.length ? (range = slice$6.call(_), scale) : range.slice();
};

scale.unknown = function(_) {
Expand Down Expand Up @@ -5335,11 +5335,11 @@
};

scale.range = function(_) {
return arguments.length ? (range = slice$5.call(_), rescale()) : range.slice();
return arguments.length ? (range = slice$6.call(_), rescale()) : range.slice();
};

scale.rangeRound = function(_) {
return range = slice$5.call(_), interpolate$$1 = interpolateRound, rescale();
return range = slice$6.call(_), interpolate$$1 = interpolateRound, rescale();
};

scale.clamp = function(_) {
Expand Down Expand Up @@ -7814,7 +7814,7 @@
for (var i = 0; i < axisBrushes.length; i++) {
var brush$$1 = document.getElementById('brush-' + pos + '-' + i);

if (brushSelection(brush$$1) !== null) {
if (brush$$1 && brushSelection(brush$$1) !== null) {
return true;
}
}
Expand All @@ -7826,7 +7826,9 @@
var extents = actives.map(function (p) {
var axisBrushes = brushes[p];

return axisBrushes.map(function (d, i) {
return axisBrushes.filter(function (d) {
return !pc.hideAxis().includes(d);
}).map(function (d, i) {
return brushSelection(document.getElementById('brush-' + Object.keys(config.dimensions).indexOf(p) + '-' + i));
}).map(function (d, i) {
if (d === null || d === undefined) {
Expand Down Expand Up @@ -8131,20 +8133,32 @@
return function (extents) {
var brushes = state.brushes;

var hiddenAxes = pc.hideAxis();

if (typeof extents === 'undefined') {
return Object.keys(config.dimensions).reduce(function (acc, cur, pos) {
return Object.keys(config.dimensions).filter(function (d) {
return !hiddenAxes.includes(d);
}).reduce(function (acc, cur, pos) {
var axisBrushes = brushes[cur];

if (axisBrushes === undefined || axisBrushes === null) {
acc[cur] = [];
} else {
acc[cur] = axisBrushes.reduce(function (d, p, i) {
var range = brushSelection(document.getElementById('brush-' + pos + '-' + i));
if (range !== null) {
d = d.push(range);
}
var raw = brushSelection(document.getElementById('brush-' + pos + '-' + i));

if (raw) {
var yScale = config.dimensions[cur].yscale;
var scaled = invertByScale(raw, yScale);

d.push({
extent: p.brush.extent(),
selection: {
raw: raw,
scaled: scaled
}
});
}
return d;
}, []);
}
Expand Down Expand Up @@ -8210,12 +8224,15 @@
Object.keys(config.dimensions).forEach(function (d, pos) {
var axisBrush = brushes[d];

axisBrush.forEach(function (e, i) {
var brush$$1 = document.getElementById('brush-' + pos + '-' + i);
if (brushSelection(brush$$1) !== null) {
pc.g().select('#brush-' + pos + '-' + i).call(e.brush.move, null);
}
});
// hidden axes will be undefined
if (axisBrush) {
axisBrush.forEach(function (e, i) {
var brush$$1 = document.getElementById('brush-' + pos + '-' + i);
if (brush$$1 && brushSelection(brush$$1) !== null) {
pc.g().select('#brush-' + pos + '-' + i).call(e.brush.move, null);
}
});
}
});

pc.renderBrushed();
Expand All @@ -8225,16 +8242,18 @@
var axisBrush = brushes[dimension];
var pos = Object.keys(config.dimensions).indexOf(dimension);

axisBrush.forEach(function (e, i) {
var brush$$1 = document.getElementById('brush-' + pos + '-' + i);
if (brushSelection(brush$$1) !== null) {
pc.g().select('#brush-' + pos + '-' + i).call(e.brush.move, null);
if (axisBrush) {
axisBrush.forEach(function (e, i) {
var brush$$1 = document.getElementById('brush-' + pos + '-' + i);
if (brushSelection(brush$$1) !== null) {
pc.g().select('#brush-' + pos + '-' + i).call(e.brush.move, null);

if (typeof e.event === 'function') {
e.event(select('#brush-' + pos + '-' + i));
if (typeof e.event === 'function') {
e.event(select('#brush-' + pos + '-' + i));
}
}
}
});
});
}

pc.renderBrushed();
}
Expand All @@ -8258,12 +8277,16 @@
pc.createAxes();
}

var hiddenAxes = pc.hideAxis();

pc.g().append('svg:g').attr('id', function (d, i) {
return 'brush-group-' + i;
}).attr('class', 'brush-group').attr('dimension', function (d) {
return d;
}).each(function (d) {
brushFor$1(state, config, pc, events, brushGroup)(d, select(this));
if (!hiddenAxes.includes(d)) {
brushFor$1(state, config, pc, events, brushGroup)(d, select(this));
}
});

pc.brushExtents = brushExtents$1(state, config, pc, events, brushGroup);
Expand Down Expand Up @@ -11198,7 +11221,7 @@
};
};

var brushReset$4 = function brushReset(config) {
var brushReset$4 = function brushReset(config, pc) {
return function (dimension) {
var brushesToKeep = [];
for (var j = 0; j < config.brushes.length; j++) {
Expand Down Expand Up @@ -11472,7 +11495,7 @@
};
};

var version$1 = "2.2.8";
var version$1 = "2.2.10";

var DefaultConfig = {
data: [],
Expand Down Expand Up @@ -11662,8 +11685,10 @@
pc.render();
}
}).on('hideAxis', function (d) {
pc.brushReset();
pc.dimensions(pc.applyDimensionDefaults());
pc.dimensions(without(config.dimensions, d.value));
pc.render();
}).on('flipAxes', function (d) {
if (d.value && d.value.length) {
d.value.forEach(function (dimension) {
Expand Down Expand Up @@ -11793,7 +11818,7 @@
pc.updateAxes = updateAxes(config, pc, position, axis, flags);
pc.applyAxisConfig = applyAxisConfig;
pc.brushable = brushable(config, pc, flags);
pc.brushReset = brushReset$4(config);
pc.brushReset = brushReset$4(config, pc);
pc.selected = selected$4(config, pc);
pc.reorderable = reorderable(config, pc, xscale, position, dragging, flags);

Expand Down Expand Up @@ -37777,7 +37802,7 @@
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the slice of `array`.
*/
function slice$7(array, start, end) {
function slice$8(array, start, end) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
Expand Down Expand Up @@ -40608,7 +40633,7 @@
initial, intersection: intersection$1, intersectionBy, intersectionWith, join,
last, lastIndexOf, nth, pull, pullAll,
pullAllBy, pullAllWith, pullAt, remove: remove$1, reverse: reverse$1,
slice: slice$7, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex,
slice: slice$8, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex,
sortedLastIndexBy, sortedLastIndexOf, sortedUniq, sortedUniqBy, tail,
take, takeRight, takeRightWhile, takeWhile, union,
unionBy, unionWith, uniq, uniqBy, uniqWith,
Expand Down Expand Up @@ -46819,7 +46844,7 @@
};
};

var version$2 = "1.0.0";
var version$2 = "1.0.1";

//css

Expand Down
2 changes: 1 addition & 1 deletion dist/parasol.standalone.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parasol-es",
"version": "1.0.1",
"version": "1.0.2",
"description": "ES6 module for interactive visualization of multi-objective optimization problems, based on d3-v5 and parcoords-es modules",
"main": "dist/parasol.js",
"module": "dist/parasol.esm.js",
Expand Down Expand Up @@ -92,7 +92,7 @@
"ml-distance-euclidean": "^2.0.0",
"ml-kmeans": "^4.2.1",
"ml-xsadd": "^2.0.0",
"parcoord-es": "^2.2.8",
"parcoord-es": "^2.2.10",
"random": "^2.0.12",
"slickgrid-es6": "^3.0.1"
}
Expand Down

0 comments on commit 31fcdae

Please sign in to comment.