Merge branch 'develop' of http://120.46.212.6:3000/joylink/rts-sim-testing-client into develop
This commit is contained in:
commit
2f0ab96b68
@ -86,6 +86,7 @@ export class TccHandleInteraction extends GraphicInteractionPlugin<TccHandle> {
|
|||||||
isMouseDown = false;
|
isMouseDown = false;
|
||||||
mouseDownBeginPos = 0;
|
mouseDownBeginPos = 0;
|
||||||
mouseDownTccHandleBeginPos = 0;
|
mouseDownTccHandleBeginPos = 0;
|
||||||
|
timeout: string | number | NodeJS.Timeout | undefined;
|
||||||
constructor(app: IGraphicScene) {
|
constructor(app: IGraphicScene) {
|
||||||
super(TccHandleInteraction.Name, app);
|
super(TccHandleInteraction.Name, app);
|
||||||
}
|
}
|
||||||
@ -116,6 +117,7 @@ export class TccHandleInteraction extends GraphicInteractionPlugin<TccHandle> {
|
|||||||
g._tccHandle.onmousedown = null;
|
g._tccHandle.onmousedown = null;
|
||||||
g._tccHandle.onmouseup = null;
|
g._tccHandle.onmouseup = null;
|
||||||
g.onmousemove = null;
|
g.onmousemove = null;
|
||||||
|
clearTimeout(this.timeout);
|
||||||
}
|
}
|
||||||
onMouseDown(e: FederatedMouseEvent) {
|
onMouseDown(e: FederatedMouseEvent) {
|
||||||
const target = e.target as DisplayObject;
|
const target = e.target as DisplayObject;
|
||||||
@ -144,6 +146,10 @@ export class TccHandleInteraction extends GraphicInteractionPlugin<TccHandle> {
|
|||||||
} else if (tccHandle._tccHandle.y <= -145) {
|
} else if (tccHandle._tccHandle.y <= -145) {
|
||||||
tccHandle._tccHandle.y = -144;
|
tccHandle._tccHandle.y = -144;
|
||||||
}
|
}
|
||||||
|
clearTimeout(this.timeout);
|
||||||
|
this.timeout = setTimeout(() => {
|
||||||
|
useTccStore().onMouseUpFromTccHandle();
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMouseUp() {
|
onMouseUp() {
|
||||||
|
@ -207,6 +207,7 @@ export abstract class KeyInteraction<
|
|||||||
if (this.lastTimenRotation !== this.changeRotation) {
|
if (this.lastTimenRotation !== this.changeRotation) {
|
||||||
this.lastTimenRotation = this.changeRotation;
|
this.lastTimenRotation = this.changeRotation;
|
||||||
this.ratatingSprite.rotation = this.changeRotation;
|
this.ratatingSprite.rotation = this.changeRotation;
|
||||||
|
useTccStore().onMouseUpFromTccKeyDir();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (direction == 'ssz') {
|
if (direction == 'ssz') {
|
||||||
|
@ -60,11 +60,9 @@ export function initTccScene(lineApp: IGraphicApp, sceneName: string) {
|
|||||||
tccScene.canvas.onmouseup = () => {
|
tccScene.canvas.onmouseup = () => {
|
||||||
tccStore.canvasMouseDown = false;
|
tccStore.canvasMouseDown = false;
|
||||||
if (tccStore.mouseDownOnTccHandle) {
|
if (tccStore.mouseDownOnTccHandle) {
|
||||||
tccStore.onMouseUpFromTccHandle();
|
|
||||||
tccStore.mouseDownOnTccHandle = false;
|
tccStore.mouseDownOnTccHandle = false;
|
||||||
}
|
}
|
||||||
if (tccStore.mouseDownOnTccKeyDir) {
|
if (tccStore.mouseDownOnTccKeyDir) {
|
||||||
tccStore.onMouseUpFromTccKeyDir();
|
|
||||||
tccStore.mouseDownOnTccKeyDir = false;
|
tccStore.mouseDownOnTccKeyDir = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user