Skip to content

Commit

Permalink
Build v2.22.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Niels Dequeker committed Dec 20, 2016
1 parent 390d9a9 commit b3d718e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 40 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
#2.22.2

* Update devDependencies
* Remove unused outOfBounds calculation [#856](https://github.com/angular-ui-tree/angular-ui-tree/issues/856) and [#832](https://github.com/angular-ui-tree/angular-ui-tree/issues/832)

#2.22.1

* Fix tree sorting bug, see Issues [#831](https://github.com/angular-ui-tree/angular-ui-tree/issues/831) and [#832](https://github.com/angular-ui-tree/angular-ui-tree/issues/832)
Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "angular-ui-tree",
"version": "2.22.1",
"version": "2.22.2",
"homepage": "https://github.com/angular-ui-tree/angular-ui-tree",
"authors": [
"Jim Liu <https://github.com/JimLiu>",
Expand Down
43 changes: 8 additions & 35 deletions dist/angular-ui-tree.js
@@ -1,5 +1,5 @@
/**
* @license Angular UI Tree v2.22.1
* @license Angular UI Tree v2.22.2
* (c) 2010-2016. https://github.com/angular-ui-tree/angular-ui-tree
* License: MIT
*/
Expand Down Expand Up @@ -631,7 +631,6 @@
bindDragMoveEvents,
unbindDragMoveEvents,
keydownHandler,
outOfBounds,
isHandleChild,
el,
isUiTreeRoot,
Expand Down Expand Up @@ -1029,29 +1028,6 @@
dragElm[0].style.display = displayElm;
}

//This checks if angularUiTree attributes are found on element.
outOfBounds = !UiTreeHelper.elementIsTreeNodeHandle(targetElm) &&
!UiTreeHelper.elementIsTreeNode(targetElm) &&
!UiTreeHelper.elementIsTreeNodes(targetElm) &&
!UiTreeHelper.elementIsTree(targetElm) &&
!UiTreeHelper.elementIsPlaceholder(targetElm);

//Detect out of bounds condition, update drop target display, and prevent drop, also reset parent to source.
if (outOfBounds) {

//Remove the placeholder.
placeElm.remove();

//If the target was an empty tree, replace the empty element placeholder.
if (treeScope) {
treeScope.resetEmptyElement();
treeScope = null;
}

//Reset parent to source parent.
dragInfo.resetParent();
}

//Assigning scope to target you are moving draggable over.
if (UiTreeHelper.elementIsTree(targetElm)) {
targetNode = targetElm.controller('uiTree').scope;
Expand All @@ -1071,16 +1047,16 @@
moveWithinTree = (targetNode && targetNode.$treeScope && targetNode.$treeScope.$id && targetNode.$treeScope.$id === treeOfOrigin);

/* (jcarter) Notes to developers:
* pos.dirAx is either 0 or 1
* 1 means horizontal movement is happening
* 0 means vertical movement is happening
*/
* pos.dirAx is either 0 or 1
* 1 means horizontal movement is happening
* 0 means vertical movement is happening
*/

// Move nodes up and down in nesting level.
if (moveWithinTree && pos.dirAx) {

// increase horizontal level if previous sibling exists and is not collapsed
// example 1.1.1 becomes 1.2
// example 1.1.1 becomes 1.2
if (pos.distX > 0) {
prev = dragInfo.prev();
if (prev && !prev.collapsed
Expand All @@ -1104,7 +1080,7 @@
}
}
}
} else { //Either in origin tree and moving horizontally OR you are moving within a new tree.
} else { //Either in origin tree and moving horizontally OR you are moving within a new tree.

//Check it's new position.
isEmpty = false;
Expand Down Expand Up @@ -1220,9 +1196,6 @@
} else if (!targetBefore && targetNode.accept(scope, targetNode.childNodesCount())) {
targetNode.$childNodesScope.$element.append(placeElm);
dragInfo.moveTo(targetNode.$childNodesScope, targetNode.childNodes(), targetNode.childNodesCount());
} else {
outOfBounds = true;
dragInfo.resetParent();
}
}
}
Expand Down Expand Up @@ -1251,7 +1224,7 @@

//Promise resolved (or callback didn't return false)
.then(function (allowDrop) {
if (allowDrop !== false && scope.$$allowNodeDrop && !outOfBounds) {
if (allowDrop !== false && scope.$$allowNodeDrop) {
//Node drop accepted.
dragInfo.apply();

Expand Down
4 changes: 2 additions & 2 deletions dist/angular-ui-tree.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "angular-ui-tree",
"version": "2.22.1",
"version": "2.22.2",
"description": "An AngularJS UI component that can sort nested lists, provides drag & drop support and doesn't depend on jQuery",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion source/main.js
@@ -1,5 +1,5 @@
/**
* @license Angular UI Tree v2.22.1
* @license Angular UI Tree v2.22.2
* (c) 2010-2016. https://github.com/angular-ui-tree/angular-ui-tree
* License: MIT
*/
Expand Down

0 comments on commit b3d718e

Please sign in to comment.