Fixed linting errors and warnings

This commit is contained in:
Jori Lallo
2017-05-10 00:02:11 -07:00
parent eb8d2631fb
commit a98199599a
15 changed files with 42 additions and 88 deletions

View File

@ -4,7 +4,7 @@ const Node = require('./Node');
import styles from './Tree.scss';
module.exports = React.createClass({
export default React.createClass({
displayName: 'UITree',
propTypes: {
@ -175,14 +175,14 @@ module.exports = React.createClass({
} else if (diffY > dragging.h) {
// down
if (index.next) {
var below = tree.getIndex(index.next);
let below = tree.getIndex(index.next);
if (below.children && below.children.length && !below.node.collapsed) {
newIndex = tree.move(index.id, index.next, 'prepend');
} else {
newIndex = tree.move(index.id, index.next, 'after');
}
} else {
var below = tree.getNodeByTop(index.top + index.height);
let below = tree.getNodeByTop(index.top + index.height);
if (below && below.parent !== index.id) {
if (below.children && below.children.length) {
newIndex = tree.move(index.id, below.id, 'prepend');