diff --git a/app/imports/ui/creature/character/CharacterSheetFab.vue b/app/imports/ui/creature/character/CharacterSheetFab.vue
index 54d72cb4..f633d76a 100644
--- a/app/imports/ui/creature/character/CharacterSheetFab.vue
+++ b/app/imports/ui/creature/character/CharacterSheetFab.vue
@@ -10,14 +10,19 @@
color="primary"
fab
data-id="insert-creature-property-fab"
+ class="insert-creature-property-fab"
small
>
-
- close
-
-
- add
-
+
+
+ add
+
+
@@ -84,6 +89,11 @@
methods: {
insertPropertyOfType(type){
let that = this;
+ // hide the whole fab
+ let fab = document.querySelector('.insert-creature-property-fab');
+ if (fab) fab.style.opacity = '0'
+
+ // Open the dialog to insert the property
this.$store.commit('pushDialogStack', {
component: 'creature-property-creation-dialog',
elementId: 'insert-creature-property-type-' + type,
@@ -91,7 +101,20 @@
forcedType: type,
},
callback(creatureProperty){
- if (!creatureProperty) return;
+ if (!creatureProperty) return 'insert-creature-property-fab';
+
+ // Bring back the fab with scale up animation
+ if (fab){
+ fab.style.transition = 'none';
+ fab.style.opacity = '';
+ fab.style.transform = 'scale(0)';
+ setTimeout(()=> {
+ fab.style.transform = '';
+ fab.style.transition = '';
+ }, 400);
+ }
+
+ // Insert the property
creatureProperty.parent = {collection: 'creatures', id: that.creatureId};
creatureProperty.ancestors = [ {collection: 'creatures', id: that.creatureId}];
setDocToLastOrder({collection: CreatureProperties, doc: creatureProperty});
@@ -105,4 +128,7 @@