Skip to content

Commit 77fb038

Browse files
committed
- Fix expand & collect.
1 parent 97694b4 commit 77fb038

File tree

7 files changed

+30
-22
lines changed

7 files changed

+30
-22
lines changed

dist/ng-tree-dnd.debug.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,6 @@ angular.module('ntt.TreeDnD')
231231
_icon = nodeOf.__icon__;
232232
nodeOf.__icon_class__ = scope.$class.icon[_icon];
233233
} else {
234-
235-
var parentReal = nodeOf.__parent_real__,
236-
parentNode = scope.tree_nodes[parentReal] || undefined;
237-
238234
if (!nodeOf.__inited__) {
239235
nodeOf.__inited__ = true;
240236
}
@@ -248,13 +244,19 @@ angular.module('ntt.TreeDnD')
248244
hashKey = nodeOf.__hashKey__;
249245
}
250246

247+
/*
248+
// remove to fix expand
249+
250+
var parentReal = nodeOf.__parent_real__,
251+
parentNode = scope.tree_nodes[parentReal] || undefined;
251252
if (parentNode && (!parentNode.__expanded__ || !parentNode.__visible__)) {
252253
element.addClass(scope.$class.hidden);
253254
nodeOf.__visible__ = false;
254255
} else {
255256
element.removeClass(scope.$class.hidden);
256257
nodeOf.__visible__ = true;
257258
}
259+
*/
258260

259261
var _childs = nodeOf.__children__,
260262
_len = _childs.length,
@@ -1040,7 +1042,7 @@ function fnInitTreeDnD($timeout, $http, $compile, $parse, $window, $document, $t
10401042
$scope.$watch(
10411043
$attrs.treeData, function (val) {
10421044
if (angular.equals(val, $scope.treeData)) {
1043-
return;
1045+
return; // jmp out
10441046
}
10451047

10461048
tmpTreeData = val;

dist/ng-tree-dnd.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,6 @@ angular.module('ntt.TreeDnD')
231231
_icon = nodeOf.__icon__;
232232
nodeOf.__icon_class__ = scope.$class.icon[_icon];
233233
} else {
234-
235-
var parentReal = nodeOf.__parent_real__,
236-
parentNode = scope.tree_nodes[parentReal] || undefined;
237-
238234
if (!nodeOf.__inited__) {
239235
nodeOf.__inited__ = true;
240236
}
@@ -248,13 +244,19 @@ angular.module('ntt.TreeDnD')
248244
hashKey = nodeOf.__hashKey__;
249245
}
250246

247+
/*
248+
// remove to fix expand
249+
250+
var parentReal = nodeOf.__parent_real__,
251+
parentNode = scope.tree_nodes[parentReal] || undefined;
251252
if (parentNode && (!parentNode.__expanded__ || !parentNode.__visible__)) {
252253
element.addClass(scope.$class.hidden);
253254
nodeOf.__visible__ = false;
254255
} else {
255256
element.removeClass(scope.$class.hidden);
256257
nodeOf.__visible__ = true;
257258
}
259+
*/
258260

259261
var _childs = nodeOf.__children__,
260262
_len = _childs.length,
@@ -1040,7 +1042,7 @@ function fnInitTreeDnD($timeout, $http, $compile, $parse, $window, $document, $t
10401042
$scope.$watch(
10411043
$attrs.treeData, function (val) {
10421044
if (angular.equals(val, $scope.treeData)) {
1043-
return;
1045+
return; // jmp out
10441046
}
10451047

10461048
tmpTreeData = val;

dist/ng-tree-dnd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ng-tree-dnd.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/directive/angular-tree-dnd-node.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ angular.module('ntt.TreeDnD')
101101
_icon = nodeOf.__icon__;
102102
nodeOf.__icon_class__ = scope.$class.icon[_icon];
103103
} else {
104-
105-
var parentReal = nodeOf.__parent_real__,
106-
parentNode = scope.tree_nodes[parentReal] || undefined;
107-
108104
if (!nodeOf.__inited__) {
109105
nodeOf.__inited__ = true;
110106
}
@@ -118,13 +114,19 @@ angular.module('ntt.TreeDnD')
118114
hashKey = nodeOf.__hashKey__;
119115
}
120116

117+
/*
118+
// remove to fix expand
119+
120+
var parentReal = nodeOf.__parent_real__,
121+
parentNode = scope.tree_nodes[parentReal] || undefined;
121122
if (parentNode && (!parentNode.__expanded__ || !parentNode.__visible__)) {
122123
element.addClass(scope.$class.hidden);
123124
nodeOf.__visible__ = false;
124125
} else {
125126
element.removeClass(scope.$class.hidden);
126127
nodeOf.__visible__ = true;
127128
}
129+
*/
128130

129131
var _childs = nodeOf.__children__,
130132
_len = _childs.length,

src/directive/angular-tree-dnd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ function fnInitTreeDnD($timeout, $http, $compile, $parse, $window, $document, $t
718718
$scope.$watch(
719719
$attrs.treeData, function (val) {
720720
if (angular.equals(val, $scope.treeData)) {
721-
return;
721+
return; // jmp out
722722
}
723723

724724
tmpTreeData = val;

tasks/vendor.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module.exports = function (gulp, $) {
4949

5050
for (i; i < len; i++) {
5151
path = arguments[i] || '';
52-
result += '/' + path.replace(/\/+$/, '')
52+
result += '/' + path.replace(/\/+$/, '');
5353
}
5454

5555
return result
@@ -59,13 +59,15 @@ module.exports = function (gulp, $) {
5959
};
6060

6161
var fnCopy = function (src, dst, opts) {
62-
dst = dst || '';
62+
dst = dst || '';
63+
6364
var base = getOpt(opts, 'base');
6465

6566
if (Array.isArray(src)) {
6667
for (var i = 0; i < src.length; i++) {
6768
fnCopy(src[i], dst, base);
6869
}
70+
6971
return; // jmp out
7072
}
7173

@@ -98,10 +100,10 @@ module.exports = function (gulp, $) {
98100
}
99101
}))
100102
.pipe($.changed(dst))
101-
.pipe(gulp.dest(dst))
103+
.pipe(gulp.dest(dst));
102104
};
103105

104-
const tasks = [
106+
var tasks = [
105107
{
106108
name: 'dev::vendor',
107109
src: path.component.vendor,
@@ -111,7 +113,7 @@ module.exports = function (gulp, $) {
111113
filter: filter.vendor
112114
},
113115
do: fnCopy
114-
},
116+
}
115117
];
116118

117119
for (var i = 0; i < tasks.length; i++) {

0 commit comments

Comments
 (0)