|
|
@ -38,12 +38,13 @@ 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;
|
|
|
|
|
|
|
|
if (this.StartCallBack)
|
|
|
|
this.StartCallBack();
|
|
|
|
this.StartCallBack();
|
|
|
|
this.mouseOn = true;
|
|
|
|
this.mouseOn = true;
|
|
|
|
let selectContainer = this.container;
|
|
|
|
let selectContainer = this.container;
|
|
|
@ -119,8 +120,10 @@ 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);
|
|
|
|
|
|
|
|
if (this.StartCallBack)
|
|
|
|
this.StartCallBack();
|
|
|
|
this.StartCallBack();
|
|
|
|
this.StartCallBack = null;
|
|
|
|
this.StartCallBack = null;
|
|
|
|
|
|
|
|
if (this.SelectCallBack)
|
|
|
|
this.SelectCallBack([]);
|
|
|
|
this.SelectCallBack([]);
|
|
|
|
this.SelectCallBack = null;
|
|
|
|
this.SelectCallBack = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|