diff --git a/ElectronJS/src/taskGrid/FlowChart.js b/ElectronJS/src/taskGrid/FlowChart.js
index 5db7c2c..7010a31 100644
--- a/ElectronJS/src/taskGrid/FlowChart.js
+++ b/ElectronJS/src/taskGrid/FlowChart.js
@@ -235,14 +235,14 @@ function newNode(node) {
${title}
- ↓
`;
+ ↓
`;
} else if (type == 1) //循环
{
return `
- ↓
`;
+ ↓
`;
} else if (type == 2) //判断
{
return LANG(`
@@ -250,18 +250,18 @@ function newNode(node) {
点击此处在最左边增加条件分支
- ↓
`,
+ ↓
`,
`
${title}
Click here to add a new condition to the left most
- ↓
`);
+ ↓
`);
} else //判断分支
{
return ``;
}
@@ -531,11 +531,6 @@ $(".options").mousedown(function() {
}
});
-function elementDragStart(e) {
- // e.preventDefault();
- // nowNode = this;
-}
-
function arrowDragOver(e) {
e.preventDefault();
app._data.nowArrow = { "position": this.getAttribute('position'), "pId": this.getAttribute('pId'), "num": 0 };
@@ -556,6 +551,12 @@ function elementDragEnd(e) {
toolBoxKernel.call(this, e);
}
+function arrowDragEnd(e) {
+ option = 13; //调整锚点操作
+ toolBoxKernel.call(this, e);
+ e.stopPropagation();
+}
+
function bindEvents() {
// 清空原来的listener然后再添加新的listener
//以下绑定了左右键的行为
@@ -565,8 +566,6 @@ function bindEvents() {
rule.addEventListener('mousedown', elementMousedown);
rule.removeEventListener('click', elementClick);
rule.addEventListener('click', elementClick);
- rule.removeEventListener('dragstart', elementDragStart);
- rule.addEventListener('dragstart', elementDragStart);
rule.removeEventListener('dragend', elementDragEnd);
rule.addEventListener('dragend', elementDragEnd);
}
@@ -578,6 +577,8 @@ function bindEvents() {
rule.addEventListener('mousedown', arrowMouseDown);
rule.removeEventListener('dragover', arrowDragOver);
rule.addEventListener('dragover', arrowDragOver);
+ rule.removeEventListener('dragend', arrowDragEnd);
+ rule.addEventListener('dragend', arrowDragEnd);
}
let branch = document.getElementsByClassName('branchAdd');
for (let i = 0, rule; rule = branch[i++];) {