Fixed add-property button not re-appearing when adding a reference property
This commit is contained in:
@@ -55,6 +55,9 @@
|
|||||||
VLayout,
|
VLayout,
|
||||||
...DialogComponentIndex,
|
...DialogComponentIndex,
|
||||||
},
|
},
|
||||||
|
data(){return {
|
||||||
|
hiddenElements: [],
|
||||||
|
}},
|
||||||
computed: {
|
computed: {
|
||||||
dialogs(){
|
dialogs(){
|
||||||
return this.$store.state.dialogStack.dialogs;
|
return this.$store.state.dialogStack.dialogs;
|
||||||
@@ -130,7 +133,7 @@
|
|||||||
// hide the source
|
// hide the source
|
||||||
source.style.transition = 'none';
|
source.style.transition = 'none';
|
||||||
source.style.opacity = '0';
|
source.style.opacity = '0';
|
||||||
this.hiddenElement = source;
|
this.hiddenElements.push(source);
|
||||||
|
|
||||||
// Instantly mock the source
|
// Instantly mock the source
|
||||||
target.style.transition = 'none';
|
target.style.transition = 'none';
|
||||||
@@ -153,6 +156,7 @@
|
|||||||
},
|
},
|
||||||
doLeave(target, done){
|
doLeave(target, done){
|
||||||
let elementId;
|
let elementId;
|
||||||
|
let hiddenElement = this.hiddenElements.pop();
|
||||||
let returnElementId = this.$store.state.dialogStack.currentReturnElement;
|
let returnElementId = this.$store.state.dialogStack.currentReturnElement;
|
||||||
if (returnElementId) {
|
if (returnElementId) {
|
||||||
elementId = returnElementId;
|
elementId = returnElementId;
|
||||||
@@ -166,7 +170,7 @@
|
|||||||
let source = this.getTopElementByDataId(elementId);
|
let source = this.getTopElementByDataId(elementId);
|
||||||
if (!source){
|
if (!source){
|
||||||
console.warn(`Can't find source for ${elementId}`);
|
console.warn(`Can't find source for ${elementId}`);
|
||||||
if (this.hiddenElement) this.hiddenElement.style.opacity = null;
|
if (hiddenElement) hiddenElement.style.opacity = null;
|
||||||
done();
|
done();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -180,10 +184,10 @@
|
|||||||
// If the source and the hidden Element are different
|
// If the source and the hidden Element are different
|
||||||
// hide the source and reveal the hidden element
|
// hide the source and reveal the hidden element
|
||||||
let originalSourceTransition = source.style.transition;
|
let originalSourceTransition = source.style.transition;
|
||||||
if (this.hiddenElement !== source){
|
if (hiddenElement !== source){
|
||||||
source.style.transition = 'none';
|
source.style.transition = 'none';
|
||||||
source.style.opacity = '0';
|
source.style.opacity = '0';
|
||||||
this.hiddenElement.style.opacity = null;
|
hiddenElement.style.opacity = null;
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
source.style.opacity = null;
|
source.style.opacity = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user