Skip to content

Commit

Permalink
fix bug type of them not same
Browse files Browse the repository at this point in the history
  • Loading branch information
A1Gard committed Feb 22, 2022
1 parent 2ebb420 commit 22561ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/elements/liveTie.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand All @@ -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;
}
Expand All @@ -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;
Expand Down Expand Up @@ -209,6 +208,7 @@ export default {
this.selectedID = '';
this.selected = {};
this.selectedType = '';
this.startSelect = false;
},
calcTop: function (i) {
let top = 125;
Expand Down

0 comments on commit 22561ba

Please sign in to comment.