mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-05 23:27:31 +08:00
Text edit input behavior fixed
This commit is contained in:
@@ -30,8 +30,7 @@ export default class IMouseClickDrag extends IPointing {
|
||||
|
||||
started = false
|
||||
|
||||
constructor(target, blueprint, options) {
|
||||
options.unlistenOnTextEdit
|
||||
constructor(target, blueprint, options = {}) {
|
||||
super(target, blueprint, options)
|
||||
this.clickButton = options?.clickButton ?? 0
|
||||
this.exitAnyButton = options?.exitAnyButton ?? true
|
||||
|
||||
@@ -87,7 +87,7 @@ export default class MouseCreateLink extends IMouseClickDrag {
|
||||
pin.removeEventListener("mouseenter", this.#mouseenterHandler)
|
||||
pin.removeEventListener("mouseleave", this.#mouseleaveHandler)
|
||||
})
|
||||
if (this.enteredPin) {
|
||||
if (this.enteredPin && this.linkValid) {
|
||||
this.blueprint.addGraphElement(this.link)
|
||||
this.link.destinationPin = this.enteredPin
|
||||
this.link.setLinkMessage(null)
|
||||
|
||||
16
js/input/mouse/MouseIgnore.js
Normal file
16
js/input/mouse/MouseIgnore.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import IMouseClickDrag from "./IMouseClickDrag";
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/PinElement").default} PinElement
|
||||
*/
|
||||
|
||||
/**
|
||||
* @extends IMouseClickDrag<PinElement>
|
||||
*/
|
||||
export default class MouseIgnore extends IMouseClickDrag {
|
||||
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.consumeEvent = true
|
||||
super(target, blueprint, options)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user