|
|
@ -38,13 +38,14 @@ export class SelectDataTool
|
|
|
|
private Start = (e: MouseEvent) =>
|
|
|
|
private Start = (e: MouseEvent) =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let el = (e.target as HTMLElement);
|
|
|
|
let el = (e.target as HTMLElement);
|
|
|
|
if (el.nodeName !== "IMG" && el.nodeName !== "svg" && el.nodeName !== "path" && !el.className.includes('control'))
|
|
|
|
if (el.nodeName !== "INPUT" && el.nodeName !== "IMG" && el.nodeName !== "svg" && el.nodeName !== "path" && !el.className.includes('control'))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
e.stopPropagation();
|
|
|
|
e.stopPropagation();
|
|
|
|
e.preventDefault();
|
|
|
|
e.preventDefault();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else return;
|
|
|
|
else return;
|
|
|
|
this.StartCallBack();
|
|
|
|
if (this.StartCallBack)
|
|
|
|
|
|
|
|
this.StartCallBack();
|
|
|
|
this.mouseOn = true;
|
|
|
|
this.mouseOn = true;
|
|
|
|
let selectContainer = this.container;
|
|
|
|
let selectContainer = this.container;
|
|
|
|
this.offsetLeft = this.getOffsetLeft(selectContainer);
|
|
|
|
this.offsetLeft = this.getOffsetLeft(selectContainer);
|
|
|
@ -119,9 +120,11 @@ export class SelectDataTool
|
|
|
|
this.container.removeEventListener('mousedown', this.Start);
|
|
|
|
this.container.removeEventListener('mousedown', this.Start);
|
|
|
|
this.container.removeEventListener('mousemove', this.Move);
|
|
|
|
this.container.removeEventListener('mousemove', this.Move);
|
|
|
|
document.removeEventListener('mouseup', this.Stop);
|
|
|
|
document.removeEventListener('mouseup', this.Stop);
|
|
|
|
this.StartCallBack();
|
|
|
|
if (this.StartCallBack)
|
|
|
|
|
|
|
|
this.StartCallBack();
|
|
|
|
this.StartCallBack = null;
|
|
|
|
this.StartCallBack = null;
|
|
|
|
this.SelectCallBack([]);
|
|
|
|
if (this.SelectCallBack)
|
|
|
|
|
|
|
|
this.SelectCallBack([]);
|
|
|
|
this.SelectCallBack = null;
|
|
|
|
this.SelectCallBack = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|