Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Jun 8, 2016
2 parents 32d4801 + bbbebeb commit e06e6dd
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
7 changes: 7 additions & 0 deletions dist/infinite-tree.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
.infinite-tree-content .infinite-tree-item:hover {
background: #f2fdff;
}
.infinite-tree-content .infinite-tree-item:disabled,
.infinite-tree-content .infinite-tree-item[disabled] {
cursor: not-allowed;
opacity: 0.5;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=50);
}
.infinite-tree-content .infinite-tree-node {
position: relative;
}
Expand Down
10 changes: 5 additions & 5 deletions dist/infinite-tree.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! infinite-tree v1.3.1 | (c) 2016 Cheton Wu <[email protected]> | MIT | https://github.com/cheton/infinite-tree */
/*! infinite-tree v1.4.0 | (c) 2016 Cheton Wu <[email protected]> | MIT | https://github.com/cheton/infinite-tree */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -225,7 +225,7 @@ return /******/ (function(modules) { // webpackBootstrap
itemTarget = itemTarget.parentElement;
}

if (!itemTarget) {
if (!itemTarget || itemTarget.hasAttribute('disabled')) {
return;
}

Expand Down Expand Up @@ -2039,7 +2039,6 @@ return /******/ (function(modules) { // webpackBootstrap
// @param {boolean} [options.openAllNodes] True to open all nodes. Defaults to false.
// @param {array} [options.openNodes] An array that contains the ids of open nodes
// @return {array}
/* eslint no-console: 0 */
var flatten = function flatten() {
var nodes = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
Expand All @@ -2064,6 +2063,7 @@ return /******/ (function(modules) { // webpackBootstrap
parentNode = new _node2['default'](parentNode);
}
var rootNode = parentNode || new _node2['default']({ // defaults
label: '',
parent: null,
children: nodes,
state: {
Expand Down Expand Up @@ -2098,7 +2098,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (options.throwOnError) {
throw new Error('The node might have been corrupted: id=' + JSON.stringify(p.id) + ', state=' + JSON.stringify(p.state));
} else {
console && console.log('Error: The node might have been corrupted: id=%s, parent=%s, children=%s, state=%s', JSON.stringify(p.id), p.parent, p.children, JSON.stringify(p.state));
console && console.log('Error: The node might have been corrupted: id=%s, label=%s, parent=%s, children=%s, state=%s', JSON.stringify(p.id), JSON.stringify(p.label), p.parent, p.children, JSON.stringify(p.state));
}
}

Expand Down Expand Up @@ -2228,7 +2228,6 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';

exports.__esModule = true;
/* eslint no-restricted-syntax: 0 */
var extend = function extend(target) {
for (var _len = arguments.length, sources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
sources[_key - 1] = arguments[_key];
Expand Down Expand Up @@ -2275,6 +2274,7 @@ return /******/ (function(modules) { // webpackBootstrap
_classCallCheck(this, Node);

this.id = null;
this.label = '';
this.parent = null;
this.children = [];
this.state = {};
Expand Down
6 changes: 3 additions & 3 deletions dist/infinite-tree.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "infinite-tree",
"version": "1.3.1",
"version": "1.4.0",
"description": "A browser-ready tree library that can efficiently display a large amount of data using infinite scrolling.",
"homepage": "https://github.com/cheton/infinite-tree",
"main": "lib/index.js",
Expand Down
5 changes: 5 additions & 0 deletions src/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
.infinite-tree-item:hover {
background: #f2fdff;
}
.infinite-tree-item:disabled,
.infinite-tree-item[disabled] {
cursor: not-allowed;
opacity: 0.5;
}
.infinite-tree-node {
position: relative;
}
Expand Down
2 changes: 1 addition & 1 deletion src/infinite-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class InfiniteTree extends events.EventEmitter {
itemTarget = itemTarget.parentElement;
}

if (!itemTarget) {
if (!itemTarget || itemTarget.hasAttribute('disabled')) {
return;
}

Expand Down

0 comments on commit e06e6dd

Please sign in to comment.