Skip to content

Commit

Permalink
fixed bugs in Components/Grid/QETrace.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxue committed Mar 5, 2017
1 parent 9c5dd7e commit 37bfc4b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/examples/GridWorld/Components/Grid/QETrace.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component, PropTypes } from 'react';
import React from 'react';


class Trace extends Component {
class Trace extends React.Component {
calcXY(coords, action) {
const {xmin, ymin, xmid, ymid, xmax, ymax} = coords;
const C = 1 / 3;
Expand Down Expand Up @@ -39,10 +39,12 @@ class Trace extends Component {
}

const pt = {};
['xmin', 'ymin', ' xmid', 'ymid', 'xmax', 'ymax'].forEach((key) => {
pt[key] = PropTypes.number.isRequired;
['xmin', 'ymin', 'xmid', 'ymid', 'xmax', 'ymax'].forEach((key) => {
pt[key] = React.PropTypes.number.isRequired;
});

Trace.propTypes = pt;
Trace.propTypes = {
coords: React.PropTypes.shape(pt)
};

export default Trace;

0 comments on commit 37bfc4b

Please sign in to comment.