Skip to content

Commit

Permalink
Patched ZIM Connector - to fix dropping on endNode===false.
Browse files Browse the repository at this point in the history
  • Loading branch information
danzen committed May 13, 2024
1 parent 15325d9 commit abcd210
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zimjs",
"version": "16.3.4",
"version": "16.3.5",
"type": "module",
"main": "./src/zim.js",
"types": "./ts-src/typings/zim",
Expand Down
4 changes: 2 additions & 2 deletions src/zim.js
Original file line number Diff line number Diff line change
Expand Up @@ -42111,7 +42111,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
if (node == obj) return;
if (node.hitTestCircles(obj)) {
hitObj = obj;
if (that.bases && (obj.endNode===false || (obj.endNode!==true && obj.base && obj.base.endNode===false) || node.orientation != obj.orientation || (node.creator && node.creator.base && node.creator.base == obj.base))) return;
if (that.bases && (obj.endNode===false || (obj.endNode!==true && obj.base && obj.base.endNode===false) || node.orientation != obj.orientation || (node.creator && node.creator.base && node.creator.base == obj.base))) return "no";
if (node.dropArray) if (node.dropArray.indexOf(obj.dropIndex) == -1) return;
if (!duplicateLine && node.lineArray && node.lineArray.indexOf(obj.dropIndex) != -1) return;
if (dropType == "on") return false; // bad will be true
Expand All @@ -42120,7 +42120,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
}
});
// loop automatically returns true
if (bad && !(dropType=="single" && hitCount==1)) {
if (bad=="no" || (bad && !(dropType=="single" && hitCount==1))) {
noConnect(node);
return;
} else {
Expand Down

0 comments on commit abcd210

Please sign in to comment.