Skip to content
Permalink
Browse files

Run all code though linter.

  • Loading branch information...
jamesleesaunders committed Nov 1, 2019
1 parent 261b3bf commit 7bc0ba3680f1f8403e5fa3d69d62da540840f1a5
Showing with 226 additions and 226 deletions.
  1. +86 −86 dist/d3-x3d.js
  2. BIN dist/d3-x3d.zip
  3. +1 −1 examples/X3DOM/chart/AreaChartMultiSeries.html
  4. +2 −2 examples/X3DOM/chart/BarChartMultiSeries.html
  5. +1 −1 examples/X3DOM/chart/BarChartVertical.html
  6. +1 −1 examples/X3DOM/chart/BubbleChart.html
  7. +1 −1 examples/X3DOM/chart/RibbonChartMultiSeries.html
  8. +2 −2 examples/X3DOM/chart/VectorFieldChart.html
  9. +1 −1 examples/X3DOM/component/BarsMultiSeries.html
  10. +1 −1 examples/X3DOM/component/BubblesMultiSeries.html
  11. +1 −1 examples/X3DOM/component/RibbonMultiSeries.html
  12. +1 −1 examples/X3DOM/component/Showcase.html
  13. +1 −1 examples/X_ITE/chart/AreaChartMultiSeries.html
  14. +2 −2 examples/X_ITE/chart/BarChartMultiSeries.html
  15. +1 −1 examples/X_ITE/chart/BarChartVertical.html
  16. +1 −1 examples/X_ITE/chart/BubbleChart.html
  17. +1 −1 examples/X_ITE/chart/RibbonChartMultiSeries.html
  18. +2 −2 examples/X_ITE/chart/VectorFieldChart.html
  19. +1 −1 examples/X_ITE/component/BarsMultiSeries.html
  20. +1 −1 examples/X_ITE/component/BubblesMultiSeries.html
  21. +1 −1 examples/X_ITE/component/RibbonMultiSeries.html
  22. +1 −1 examples/X_ITE/component/Showcase.html
  23. +4 −4 examples/logos/d3-x3d-logo-x3dom.html
  24. +1 −1 src/chart/areaChartMultiSeries.js
  25. +1 −1 src/chart/barChartMultiSeries.js
  26. +4 −4 src/chart/barChartVertical.js
  27. +1 −1 src/chart/scatterPlot.js
  28. +1 −1 src/chart/vectorFieldChart.js
  29. +1 −1 src/chart/volumeSliceChart.js
  30. +53 −53 src/colorHelper.js
  31. +1 −1 src/component/area.js
  32. +4 −4 src/component/axis.js
  33. +1 −1 src/component/axisThreePlane.js
  34. +1 −1 src/component/bubbles.js
  35. +1 −1 src/component/label.js
  36. +1 −1 src/component/ribbon.js
  37. +2 −2 src/component/vectorFields.js
  38. +1 −1 src/component/viewpoint.js
  39. +1 −1 src/component/volumeSlice.js
  40. +1 −1 src/dataTransform.js
  41. +6 −6 src/events.js
  42. +30 −30 src/randomData.js
@@ -157,7 +157,7 @@

var SINGLE_SERIES = 1;
var MULTI_SERIES = 2;
var coordinates = ['x', 'y', 'z'];
var coordinates = ["x", "y", "z"];

/**
* Data Type (Single or Multi Series)
@@ -702,54 +702,54 @@
* @type {Array}
*/
var colorNames = {
aliceblue: '#f0f8ff', antiquewhite: '#faebd7', aqua: '#00ffff',
aquamarine: '#7fffd4', azure: '#f0ffff', beige: '#f5f5dc',
bisque: '#ffe4c4', black: '#000000', blanchedalmond: '#ffebcd',
blue: '#0000ff', blueviolet: '#8a2be2', brown: '#a52a2a',
burlywood: '#deb887', cadetblue: '#5f9ea0', chartreuse: '#7fff00',
chocolate: '#d2691e', coral: '#ff7f50', cornflowerblue: '#6495ed',
cornsilk: '#fff8dc', crimson: '#dc143c', cyan: '#00ffff',
darkblue: '#00008b', darkcyan: '#008b8b', darkgoldenrod: '#b8860b',
darkgray: '#a9a9a9', darkgreen: '#006400', darkkhaki: '#bdb76b',
darkmagenta: '#8b008b', darkolivegreen: '#556b2f', darkorange: '#ff8c00',
darkorchid: '#9932cc', darkred: '#8b0000', darksalmon: '#e9967a',
darkseagreen: '#8fbc8f', darkslateblue: '#483d8b', darkslategray: '#2f4f4f',
darkturquoise: '#00ced1', darkviolet: '#9400d3', deeppink: '#ff1493',
deepskyblue: '#00bfff', dimgray: '#696969', dodgerblue: '#1e90ff',
feldspar: '#d19275', firebrick: '#b22222', floralwhite: '#fffaf0',
forestgreen: '#228b22', fuchsia: '#ff00ff', gainsboro: '#dcdcdc',
ghostwhite: '#f8f8ff', gold: '#ffd700', goldenrod: '#daa520',
gray: '#808080', green: '#008000', greenyellow: '#adff2f',
honeydew: '#f0fff0', hotpink: '#ff69b4', indianred: '#cd5c5c',
indigo: '#4b0082', ivory: '#fffff0', khaki: '#f0e68c',
lavender: '#e6e6fa', lavenderblush: '#fff0f5', lawngreen: '#7cfc00',
lemonchiffon: '#fffacd', lightblue: '#add8e6', lightcoral: '#f08080',
lightcyan: '#e0ffff', lightgoldenrodyellow: '#fafad2', lightgrey: '#d3d3d3',
lightgreen: '#90ee90', lightpink: '#ffb6c1', lightsalmon: '#ffa07a',
lightseagreen: '#20b2aa', lightskyblue: '#87cefa', lightslateblue: '#8470ff',
lightslategray: '#778899', lightsteelblue: '#b0c4de', lightyellow: '#ffffe0',
lime: '#00ff00', limegreen: '#32cd32', linen: '#faf0e6',
magenta: '#ff00ff', maroon: '#800000', mediumaquamarine: '#66cdaa',
mediumblue: '#0000cd', mediumorchid: '#ba55d3', mediumpurple: '#9370d8',
mediumseagreen: '#3cb371', mediumslateblue: '#7b68ee', mediumspringgreen: '#00fa9a',
mediumturquoise: '#48d1cc', mediumvioletred: '#c71585', midnightblue: '#191970',
mintcream: '#f5fffa', mistyrose: '#ffe4e1', moccasin: '#ffe4b5',
navajowhite: '#ffdead', navy: '#000080', oldlace: '#fdf5e6',
olive: '#808000', olivedrab: '#6b8e23', orange: '#ffa500',
orangered: '#ff4500', orchid: '#da70d6', palegoldenrod: '#eee8aa',
palegreen: '#98fb98', paleturquoise: '#afeeee', palevioletred: '#d87093',
papayawhip: '#ffefd5', peachpuff: '#ffdab9', peru: '#cd853f',
pink: '#ffc0cb', plum: '#dda0dd', powderblue: '#b0e0e6',
purple: '#800080', red: '#ff0000', rosybrown: '#bc8f8f',
royalblue: '#4169e1', saddlebrown: '#8b4513', salmon: '#fa8072',
sandybrown: '#f4a460', seagreen: '#2e8b57', seashell: '#fff5ee',
sienna: '#a0522d', silver: '#c0c0c0', skyblue: '#87ceeb',
slateblue: '#6a5acd', slategray: '#708090', snow: '#fffafa',
springgreen: '#00ff7f', steelblue: '#4682b4', tan: '#d2b48c',
teal: '#008080', thistle: '#d8bfd8', tomato: '#ff6347',
turquoise: '#40e0d0', violet: '#ee82ee', violetred: '#d02090',
wheat: '#f5deb3', white: '#ffffff', whitesmoke: '#f5f5f5',
yellow: '#ffff00', yellowgreen: '#9acd32'
aliceblue: "#f0f8ff", antiquewhite: "#faebd7", aqua: "#00ffff",
aquamarine: "#7fffd4", azure: "#f0ffff", beige: "#f5f5dc",
bisque: "#ffe4c4", black: "#000000", blanchedalmond: "#ffebcd",
blue: "#0000ff", blueviolet: "#8a2be2", brown: "#a52a2a",
burlywood: "#deb887", cadetblue: "#5f9ea0", chartreuse: "#7fff00",
chocolate: "#d2691e", coral: "#ff7f50", cornflowerblue: "#6495ed",
cornsilk: "#fff8dc", crimson: "#dc143c", cyan: "#00ffff",
darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b",
darkgray: "#a9a9a9", darkgreen: "#006400", darkkhaki: "#bdb76b",
darkmagenta: "#8b008b", darkolivegreen: "#556b2f", darkorange: "#ff8c00",
darkorchid: "#9932cc", darkred: "#8b0000", darksalmon: "#e9967a",
darkseagreen: "#8fbc8f", darkslateblue: "#483d8b", darkslategray: "#2f4f4f",
darkturquoise: "#00ced1", darkviolet: "#9400d3", deeppink: "#ff1493",
deepskyblue: "#00bfff", dimgray: "#696969", dodgerblue: "#1e90ff",
feldspar: "#d19275", firebrick: "#b22222", floralwhite: "#fffaf0",
forestgreen: "#228b22", fuchsia: "#ff00ff", gainsboro: "#dcdcdc",
ghostwhite: "#f8f8ff", gold: "#ffd700", goldenrod: "#daa520",
gray: "#808080", green: "#008000", greenyellow: "#adff2f",
honeydew: "#f0fff0", hotpink: "#ff69b4", indianred: "#cd5c5c",
indigo: "#4b0082", ivory: "#fffff0", khaki: "#f0e68c",
lavender: "#e6e6fa", lavenderblush: "#fff0f5", lawngreen: "#7cfc00",
lemonchiffon: "#fffacd", lightblue: "#add8e6", lightcoral: "#f08080",
lightcyan: "#e0ffff", lightgoldenrodyellow: "#fafad2", lightgrey: "#d3d3d3",
lightgreen: "#90ee90", lightpink: "#ffb6c1", lightsalmon: "#ffa07a",
lightseagreen: "#20b2aa", lightskyblue: "#87cefa", lightslateblue: "#8470ff",
lightslategray: "#778899", lightsteelblue: "#b0c4de", lightyellow: "#ffffe0",
lime: "#00ff00", limegreen: "#32cd32", linen: "#faf0e6",
magenta: "#ff00ff", maroon: "#800000", mediumaquamarine: "#66cdaa",
mediumblue: "#0000cd", mediumorchid: "#ba55d3", mediumpurple: "#9370d8",
mediumseagreen: "#3cb371", mediumslateblue: "#7b68ee", mediumspringgreen: "#00fa9a",
mediumturquoise: "#48d1cc", mediumvioletred: "#c71585", midnightblue: "#191970",
mintcream: "#f5fffa", mistyrose: "#ffe4e1", moccasin: "#ffe4b5",
navajowhite: "#ffdead", navy: "#000080", oldlace: "#fdf5e6",
olive: "#808000", olivedrab: "#6b8e23", orange: "#ffa500",
orangered: "#ff4500", orchid: "#da70d6", palegoldenrod: "#eee8aa",
palegreen: "#98fb98", paleturquoise: "#afeeee", palevioletred: "#d87093",
papayawhip: "#ffefd5", peachpuff: "#ffdab9", peru: "#cd853f",
pink: "#ffc0cb", plum: "#dda0dd", powderblue: "#b0e0e6",
purple: "#800080", red: "#ff0000", rosybrown: "#bc8f8f",
royalblue: "#4169e1", saddlebrown: "#8b4513", salmon: "#fa8072",
sandybrown: "#f4a460", seagreen: "#2e8b57", seashell: "#fff5ee",
sienna: "#a0522d", silver: "#c0c0c0", skyblue: "#87ceeb",
slateblue: "#6a5acd", slategray: "#708090", snow: "#fffafa",
springgreen: "#00ff7f", steelblue: "#4682b4", tan: "#d2b48c",
teal: "#008080", thistle: "#d8bfd8", tomato: "#ff6347",
turquoise: "#40e0d0", violet: "#ee82ee", violetred: "#d02090",
wheat: "#f5deb3", white: "#ffffff", whitesmoke: "#f5f5f5",
yellow: "#ffff00", yellowgreen: "#9acd32"
};

/**
@@ -817,7 +817,7 @@
green = green.toFixed(4);
blue = blue.toFixed(4);

return red + ' ' + green + ' ' + blue;
return red + " " + green + " " + blue;
}

var colorHelper = /*#__PURE__*/Object.freeze({
@@ -1008,7 +1008,7 @@
/**
* Color Getter / Setter
*
* @param {string} _v - Color (e.g. 'red' or '#ff0000').
* @param {string} _v - Color (e.g. "red" or "#ff0000").
* @returns {*}
*/
my.color = function (_v) {
@@ -1440,7 +1440,7 @@
/**
* Direction Getter / Setter
*
* @param {string} _v - Direction of Axis (e.g. 'x', 'y', 'z').
* @param {string} _v - Direction of Axis (e.g. "x", "y", "z").
* @returns {*}
*/
my.direction = function (_v) {
@@ -1452,7 +1452,7 @@
/**
* Tick Direction Getter / Setter
*
* @param {string} _v - Direction of Ticks (e.g. 'x', 'y', 'z').
* @param {string} _v - Direction of Ticks (e.g. "x", "y", "z").
* @returns {*}
*/
my.tickDirection = function (_v) {
@@ -1524,7 +1524,7 @@
/**
* Color Getter / Setter
*
* @param {string} _v - Color (e.g. 'red' or '#ff0000').
* @param {string} _v - Color (e.g. "red" or "#ff0000").
* @returns {*}
*/
my.color = function (_v) {
@@ -1536,7 +1536,7 @@
/**
* Label Position Getter / Setter
*
* @param {string} _v - Position ('proximal' or 'distal')
* @param {string} _v - Position ("proximal" or "distal")
* @returns {*}
*/
my.labelPosition = function (_v) {
@@ -1680,7 +1680,7 @@
/**
* Label Position Getter / Setter
*
* @param {string} _v - Position ('proximal' or 'distal')
* @param {string} _v - Position ("proximal" or "distal")
* @returns {*}
*/
my.labelPosition = function (_v) {
@@ -1725,7 +1725,7 @@
*
* In X3DOM, it is the canvas which captures onclick events, therefore defining a D3 event handler
* on an single X3DOM element does not work. A workaround is to define an onclick handler which then
* forwards the call to the D3 'click' event handler with the event.
* forwards the call to the D3 "click" event handler with the event.
* Note: X3DOM and D3 event members slightly differ, so d3.mouse() function does not work.
*
* @param {event} event
@@ -1768,10 +1768,10 @@
if ("getBoundingClientRect" in document.documentElement) {
var holder = getX3domHolder(event);
var computedStyle = document.defaultView.getComputedStyle(holder, null);
var paddingLeft = parseFloat(computedStyle.getPropertyValue('padding-left'));
var borderLeftWidth = parseFloat(computedStyle.getPropertyValue('border-left-width'));
var paddingTop = parseFloat(computedStyle.getPropertyValue('padding-top'));
var borderTopWidth = parseFloat(computedStyle.getPropertyValue('border-top-width'));
var paddingLeft = parseFloat(computedStyle.getPropertyValue("padding-left"));
var borderLeftWidth = parseFloat(computedStyle.getPropertyValue("border-left-width"));
var paddingTop = parseFloat(computedStyle.getPropertyValue("padding-top"));
var borderTopWidth = parseFloat(computedStyle.getPropertyValue("border-top-width"));
var box = holder.getBoundingClientRect();
var scrolLeft = window.pageXOffset || document.body.scrollLeft;
var scrollTop = window.pageYOffset || document.body.scrollTop;
@@ -1782,7 +1782,7 @@
pageX = Math.round(pagePoint.x);
pageY = Math.round(pagePoint.y);
} else {
x3dom.debug.logError('Unable to find getBoundingClientRect or webkitConvertPointFromPageToNode');
x3dom.debug.logError("Unable to find getBoundingClientRect or webkitConvertPointFromPageToNode");
}

return { x: pageX, y: pageY };
@@ -2365,7 +2365,7 @@
/**
* Color Getter / Setter
*
* @param {string} _v - Color (e.g. 'red' or '#ff0000').
* @param {string} _v - Color (e.g. "red" or "#ff0000").
* @returns {*}
*/
my.color = function (_v) {
@@ -2892,7 +2892,7 @@
/**
* Color Getter / Setter
*
* @param {string} _v - Color (e.g. 'red' or '#ff0000').
* @param {string} _v - Color (e.g. "red" or "#ff0000").
* @returns {*}
*/
my.color = function (_v) {
@@ -3167,7 +3167,7 @@
/**
* Color Getter / Setter
*
* @param {string} _v - Color (e.g. 'red' or '#ff0000').
* @param {string} _v - Color (e.g. "red" or "#ff0000").
* @returns {*}
*/
my.color = function (_v) {
@@ -4304,7 +4304,7 @@
var vx = void 0,
vy = void 0,
vz = void 0;
if ('vx' in f) {
if ("vx" in f) {
vx = f.vx;
vy = f.vy;
vz = f.vz;
@@ -4362,7 +4362,7 @@
var vx = void 0,
vy = void 0,
vz = void 0;
if ('vx' in f) {
if ("vx" in f) {
vx = f.vx;
vy = f.vy;
vz = f.vz;
@@ -4601,7 +4601,7 @@
/**
* Set Quick Viewpoint
*
* @param {string} view - 'left', 'side', 'top', 'dimetric'
* @param {string} view - "left", "side", "top", "dimetric"
* @returns {my}
*/
my.quickView = function (view) {
@@ -4812,7 +4812,7 @@
/**
* Volume Style Getter / Setter
*
* @param {string} _v - Volume render style (either 'MPRVolume' or 'OpacityMap')
* @param {string} _v - Volume render style (either "MPRVolume" or "OpacityMap")
* @returns {*}
*/
my.volumeStyle = function (_v) {
@@ -4882,7 +4882,7 @@

/* Components */
var viewpoint = component.viewpoint();
var axis = component.axisThreePlane().labelPosition('distal');
var axis = component.axisThreePlane().labelPosition("distal");
var areas = component.areaMultiSeries();
var light = component.light();

@@ -5316,7 +5316,7 @@
/**
* Label Position Getter / Setter
*
* @param {string} _v - Position ('proximal' or 'distal')
* @param {string} _v - Position ("proximal" or "distal")
* @returns {*}
*/
my.labelPosition = function (_v) {
@@ -5438,9 +5438,9 @@
scene.call(viewpoint);

// Add Axis
xAxis.scale(xScale).direction('x').tickDirection('y').tickSize(0);
xAxis.scale(xScale).direction("x").tickDirection("y").tickSize(0);

yAxis.scale(yScale).direction('y').tickDirection('x').tickSize(yScale.range()[1] - yScale.range()[0]);
yAxis.scale(yScale).direction("y").tickDirection("x").tickSize(yScale.range()[1] - yScale.range()[0]);

scene.select(".xAxis").call(xAxis);

@@ -6509,7 +6509,7 @@
/**
* Color Getter / Setter
*
* @param {string} _v - Color (e.g. 'red' or '#ff0000').
* @param {string} _v - Color (e.g. "red" or "#ff0000").
* @returns {*}
*/
my.color = function (_v) {
@@ -6899,7 +6899,7 @@
var vx = void 0,
vy = void 0,
vz = void 0;
if ('vx' in f) {
if ("vx" in f) {
vx = f.vx;
vy = f.vy;
vz = f.vz;
@@ -7345,7 +7345,7 @@
/**
* Volume Style Getter / Setter
*
* @param {string} _v - Volume render style (either 'MPRVolume' or 'OpacityMap')
* @param {string} _v - Volume render style (either "MPRVolume" or "OpacityMap")
* @returns {*}
*/
my.volumeStyle = function (_v) {
@@ -7483,20 +7483,20 @@
*/
function dataset4() {
var data = [{
key: 'a',
values: [{ key: '1', value: 4 }, { key: '2', value: 0 }, { key: '3', value: 2 }, { key: '4', value: 0 }, { key: '5', value: 0 }]
key: "a",
values: [{ key: "1", value: 4 }, { key: "2", value: 0 }, { key: "3", value: 2 }, { key: "4", value: 0 }, { key: "5", value: 0 }]
}, {
key: 'b',
values: [{ key: '1', value: 4 }, { key: '2', value: 0 }, { key: '3', value: 2 }, { key: '4', value: 0 }, { key: '5', value: 0 }]
key: "b",
values: [{ key: "1", value: 4 }, { key: "2", value: 0 }, { key: "3", value: 2 }, { key: "4", value: 0 }, { key: "5", value: 0 }]
}, {
key: 'c',
values: [{ key: '1', value: 1 }, { key: '2', value: 0 }, { key: '3', value: 1 }, { key: '4', value: 0 }, { key: '5', value: 0 }]
key: "c",
values: [{ key: "1", value: 1 }, { key: "2", value: 0 }, { key: "3", value: 1 }, { key: "4", value: 0 }, { key: "5", value: 0 }]
}, {
key: 'd',
values: [{ key: '1', value: 4 }, { key: '2', value: 0 }, { key: '3', value: 2 }, { key: '4', value: 0 }, { key: '5', value: 0 }]
key: "d",
values: [{ key: "1", value: 4 }, { key: "2", value: 0 }, { key: "3", value: 2 }, { key: "4", value: 0 }, { key: "5", value: 0 }]
}, {
key: 'e',
values: [{ key: '1', value: 1 }, { key: '2', value: 1 }, { key: '3', value: 1 }, { key: '4', value: 1 }, { key: '5', value: 1 }]
key: "e",
values: [{ key: "1", value: 1 }, { key: "2", value: 1 }, { key: "3", value: 1 }, { key: "4", value: 1 }, { key: "5", value: 1 }]
}];

return data;
BIN -33 Bytes (100%) dist/d3-x3d.zip
Binary file not shown.
@@ -52,7 +52,7 @@
// Declare the chart component
var myChart = d3.x3d.chart.areaChartMultiSeries();
var checks = d3.selectAll('input[type=checkbox]');
var checks = d3.selectAll("input[type=checkbox]");
var refreshChart = function() {
var filterArray = [];
@@ -54,10 +54,10 @@
// Declare the chart component
var myChart = d3.x3d.chart.barChartMultiSeries();
var checks = d3.selectAll('input[type=checkbox]');
var checks = d3.selectAll("input[type=checkbox]");
var refreshChart = function() {
var labelPosition = d3.select('#labelPosition').property('checked') ? 'distal' : 'proximal';
var labelPosition = d3.select("#labelPosition").property("checked") ? "distal" : "proximal";
myChart.labelPosition(labelPosition);
@@ -41,7 +41,7 @@
// Declare the chart component
var myChart = d3.x3d.chart.barChartVertical();
var checks = d3.selectAll('input[type=checkbox]');
var checks = d3.selectAll("input[type=checkbox]");
var refreshChart = function() {
var filterArray = [];
@@ -45,7 +45,7 @@
// Declare the chart component
var myChart = d3.x3d.chart.bubbleChart();
var checks = d3.selectAll('input[type=checkbox]');
var checks = d3.selectAll("input[type=checkbox]");
var refreshChart = function() {
var filterArray = [];

0 comments on commit 7bc0ba3

Please sign in to comment.
You can’t perform that action at this time.