mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-21 05:27:34 +08:00
Fix link creation bug
This commit is contained in:
0
dist/font/roboto-bold.woff
vendored
Executable file → Normal file
0
dist/font/roboto-bold.woff
vendored
Executable file → Normal file
0
dist/font/roboto-bold.woff2
vendored
Executable file → Normal file
0
dist/font/roboto-bold.woff2
vendored
Executable file → Normal file
0
dist/font/roboto-light.woff
vendored
Executable file → Normal file
0
dist/font/roboto-light.woff
vendored
Executable file → Normal file
0
dist/font/roboto-light.woff2
vendored
Executable file → Normal file
0
dist/font/roboto-light.woff2
vendored
Executable file → Normal file
0
dist/font/roboto-regular.woff
vendored
Executable file → Normal file
0
dist/font/roboto-regular.woff
vendored
Executable file → Normal file
0
dist/font/roboto-regular.woff2
vendored
Executable file → Normal file
0
dist/font/roboto-regular.woff2
vendored
Executable file → Normal file
2638
dist/ueblueprint.js
vendored
2638
dist/ueblueprint.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -137,9 +137,10 @@ export default class LinkElement extends IElement {
|
|||||||
*/
|
*/
|
||||||
setSourcePin(pin) {
|
setSourcePin(pin) {
|
||||||
if (this.#source) {
|
if (this.#source) {
|
||||||
|
const settings = this.#source.blueprint.settings
|
||||||
const nodeElement = this.#source.getNodeElement()
|
const nodeElement = this.#source.getNodeElement()
|
||||||
nodeElement.removeEventListener(this.blueprint.settings.nodeDeleteEventName, this.#nodeDeleteHandler)
|
nodeElement.removeEventListener(settings.nodeDeleteEventName, this.#nodeDeleteHandler)
|
||||||
nodeElement.removeEventListener(this.blueprint.settings.nodeDragLocalEventName, this.#nodeDragSourceHandler)
|
nodeElement.removeEventListener(settings.nodeDragLocalEventName, this.#nodeDragSourceHandler)
|
||||||
if (this.#destination) {
|
if (this.#destination) {
|
||||||
this.#unlinkPins()
|
this.#unlinkPins()
|
||||||
}
|
}
|
||||||
@@ -147,9 +148,10 @@ export default class LinkElement extends IElement {
|
|||||||
this.#source = pin
|
this.#source = pin
|
||||||
if (this.#source) {
|
if (this.#source) {
|
||||||
const nodeElement = this.#source.getNodeElement()
|
const nodeElement = this.#source.getNodeElement()
|
||||||
|
const settings = this.#source.blueprint.settings
|
||||||
this.originatesFromInput = pin.isInput()
|
this.originatesFromInput = pin.isInput()
|
||||||
nodeElement.addEventListener(this.blueprint.settings.nodeDeleteEventName, this.#nodeDeleteHandler)
|
nodeElement.addEventListener(settings.nodeDeleteEventName, this.#nodeDeleteHandler)
|
||||||
nodeElement.addEventListener(this.blueprint.settings.nodeDragLocalEventName, this.#nodeDragSourceHandler)
|
nodeElement.addEventListener(settings.nodeDragLocalEventName, this.#nodeDragSourceHandler)
|
||||||
this.setSourceLocation()
|
this.setSourceLocation()
|
||||||
if (this.#destination) {
|
if (this.#destination) {
|
||||||
this.#linkPins()
|
this.#linkPins()
|
||||||
|
|||||||
@@ -34,4 +34,4 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"parsimmon": "^1.18.0"
|
"parsimmon": "^1.18.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user