From 22561ba77744f06080ca0fa77f73b8a1205fb64b Mon Sep 17 00:00:00 2001 From: A1Gard Date: Wed, 23 Feb 2022 01:08:14 +0330 Subject: [PATCH] fix bug type of them not same --- src/components/elements/liveTie.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/elements/liveTie.vue b/src/components/elements/liveTie.vue index 08e22a1..077801e 100644 --- a/src/components/elements/liveTie.vue +++ b/src/components/elements/liveTie.vue @@ -129,7 +129,6 @@ export default { ctx.stroke(); }, selecting: function (e) { - console.log(JSON.parse(e.target.getAttribute('data-json'))); // check if selected start or not if (this.startSelect) { let currentProp = JSON.parse(e.target.getAttribute('data-json')); @@ -140,7 +139,7 @@ export default { return false; } // check type - if (this.selected.type != currentProp.type) { + if (this.selected.type != currentProp.type && this.selectedID != '' ) { window.alertify.warning('Type of them not same'); return false; } @@ -152,7 +151,7 @@ export default { // duplicare assign for (const tie of this.ties) { - if (tie.name == inpName) { + if (tie.src == inpName) { window.alertify.warning("Can't duplicate assign."); this.resetSel(); return false; @@ -209,6 +208,7 @@ export default { this.selectedID = ''; this.selected = {}; this.selectedType = ''; + this.startSelect = false; }, calcTop: function (i) { let top = 125;