more lint - components (#336)

* more lint

* fix typo introduced in delinting

* more lint

* remove dead code

* lint fixes

* lint
This commit is contained in:
Bruce Martin
2018-10-17 07:17:51 -07:00
committed by GitHub
parent 952578680a
commit f9f43c42c0
23 changed files with 494 additions and 586 deletions

View File

@@ -38,15 +38,14 @@ export default function(regl) {
uniforms: {
distance: regl.prop("distance"),
view: regl.prop("view"),
projection: (context, props) => {
return mat4.perspective(
projection: (context, props) =>
mat4.perspective(
[],
Math.PI / 2,
context.viewportWidth * props.scale / context.viewportHeight,
(context.viewportWidth * props.scale) / context.viewportHeight,
0.01,
1000
);
}
)
},
count: regl.prop("count"),

View File

@@ -238,7 +238,7 @@ class Scatterplot extends React.Component {
// and it's alread defined to be a bottom axis.
svg
.append("g")
.attr("transform", "translate(0," + height + ")")
.attr("transform", `translate(0,${height})`)
.attr("class", "x axis")
.call(xAxis);
@@ -279,8 +279,8 @@ class Scatterplot extends React.Component {
className={styles.scatterplot}
id="scatterplot"
style={{
width: width + margin.left + margin.right + "px",
height: height + margin.top + margin.bottom + "px"
width: `${width + margin.left + margin.right}px`,
height: `${height + margin.top + margin.bottom}px`
}}
>
<canvas

View File

@@ -8,14 +8,14 @@
import * as d3 from "d3";
const setupScatterplot = (width, height, margin) => {
var container = d3.select("#scatterplot");
const container = d3.select("#scatterplot");
var svg = container
const svg = container
.append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
.attr("transform", `translate(${margin.left},${margin.top})`);
return {
svg

View File

@@ -1,9 +1,4 @@
// jshint esversion: 6
import _ from "lodash";
const paddingRight = 120;
const continuousChartWidth = 340;
export const margin = { top: 66, right: 110, bottom: 20, left: 60 };
export const width = 340;
export const height = 340 - margin.top - margin.bottom;