|
|
@ -61,11 +61,6 @@ export function registerWorkPackageMouseHandler(this: void, |
|
|
|
workPackageMouseDownFn(ev); |
|
|
|
workPackageMouseDownFn(ev); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
jBody.on("mouseup", () => { |
|
|
|
|
|
|
|
deactivate(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function applyDateValues(dates:{[name:string]: Moment}) { |
|
|
|
function applyDateValues(dates:{[name:string]: Moment}) { |
|
|
|
const wp = renderInfo.workPackage; |
|
|
|
const wp = renderInfo.workPackage; |
|
|
|
|
|
|
|
|
|
|
@ -108,6 +103,7 @@ export function registerWorkPackageMouseHandler(this: void, |
|
|
|
|
|
|
|
|
|
|
|
jBody.on("mousemove", createMouseMoveFn(direction)); |
|
|
|
jBody.on("mousemove", createMouseMoveFn(direction)); |
|
|
|
jBody.on("keyup", keyPressFn); |
|
|
|
jBody.on("keyup", keyPressFn); |
|
|
|
|
|
|
|
jBody.on("mouseup", () => deactivate(false)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function handleMouseMoveOnEmptyCell(ev: MouseEvent) { |
|
|
|
function handleMouseMoveOnEmptyCell(ev: MouseEvent) { |
|
|
@ -142,6 +138,7 @@ export function registerWorkPackageMouseHandler(this: void, |
|
|
|
|
|
|
|
|
|
|
|
if (mouseDownType === "create") { |
|
|
|
if (mouseDownType === "create") { |
|
|
|
deactivate(false); |
|
|
|
deactivate(false); |
|
|
|
|
|
|
|
ev.preventDefault(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -162,25 +159,17 @@ export function registerWorkPackageMouseHandler(this: void, |
|
|
|
deactivate(false); |
|
|
|
deactivate(false); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
jBody.on("keyup", (ev) => { |
|
|
|
jBody.on("keyup", keyPressFn); |
|
|
|
const kev: KeyboardEvent = ev as any; |
|
|
|
|
|
|
|
if (kev.keyCode === keyCodeESC) { |
|
|
|
|
|
|
|
deactivate(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function deactivate(cancelled: boolean) { |
|
|
|
function deactivate(cancelled: boolean) { |
|
|
|
workPackageTimeline.disableViewParamsCalculation = false; |
|
|
|
workPackageTimeline.disableViewParamsCalculation = false; |
|
|
|
|
|
|
|
|
|
|
|
// if (startX == null) {
|
|
|
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cell.onmousemove = handleMouseMoveOnEmptyCell; |
|
|
|
cell.onmousemove = handleMouseMoveOnEmptyCell; |
|
|
|
|
|
|
|
cell.onmouseup = null; |
|
|
|
bar.style.pointerEvents = "auto"; |
|
|
|
bar.style.pointerEvents = "auto"; |
|
|
|
|
|
|
|
jBody.off("mouseup"); |
|
|
|
jBody.off("mousemove"); |
|
|
|
jBody.off("mousemove"); |
|
|
|
jBody.off("keyup"); |
|
|
|
jBody.off("keyup"); |
|
|
|
jQuery(".hascontextmenu").css("cursor", "context-menu"); |
|
|
|
jQuery(".hascontextmenu").css("cursor", "context-menu"); |
|
|
|