Skip to content

Commit

Permalink
propose to remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
tremblap committed Nov 13, 2023
1 parent a2f90e0 commit f326906
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions jsui/fluid.plotter.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function constructColorScheme() {
uniques.push(label[0])
}
})
uniques = uniques.removeDuplicates()

uniques.sort();

var scheme = strChunk(_colorscheme, 6);
Expand Down Expand Up @@ -438,13 +438,3 @@ function onresize(w, h) {
forcesize(w, h);
}
onresize.local = 1; //private

Array.prototype.removeDuplicates = function() {
var uniqueArray = [];
for (var i = 0; i < this.length; i++) {
if (uniqueArray.indexOf(this[i]) === -1) {
uniqueArray.push(this[i]);
}
}
return uniqueArray;
};

0 comments on commit f326906

Please sign in to comment.