From 1dd82a855e3370e310f70bbf93035a36215ee602 Mon Sep 17 00:00:00 2001 From: bach Date: Fri, 6 Oct 2023 15:12:19 +0200 Subject: [PATCH] added fadein intro to mapitems #2235 --- src/App.vue | 16 +++++----------- src/assets/main.scss | 7 ++++++- src/components/ConcernementMapItem.vue | 10 ++++++++++ 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/App.vue b/src/App.vue index 09a8352..be6a234 100644 --- a/src/App.vue +++ b/src/App.vue @@ -151,22 +151,16 @@ export default {
- - + + - --> +
diff --git a/src/assets/main.scss b/src/assets/main.scss index fcae597..73101fb 100644 --- a/src/assets/main.scss +++ b/src/assets/main.scss @@ -83,7 +83,12 @@ body{ } #map-concernements{ - + div.loading{ + position: absolute; + top:50%; + left:50%; + z-index: 200; + } } #map-nav{ diff --git a/src/components/ConcernementMapItem.vue b/src/components/ConcernementMapItem.vue index afd8a88..6ba844a 100644 --- a/src/components/ConcernementMapItem.vue +++ b/src/components/ConcernementMapItem.vue @@ -521,6 +521,9 @@ export default { superposition_id: this.mapitem.superposition_ids[0] // TODO what to do with multiples superpositions ids }); + // fadein intro + this.paper_main_object.opacity = (1 + Math.random())*0.001; + // the sub items for one concernement this.paper_main_object.addChild(this.setPaperContour()); @@ -2138,6 +2141,13 @@ export default { this.paper_main_object.position = this.pos = this.body.position; + // fadein intro + if (this.paper_main_object.opacity < 9) { + this.paper_main_object.opacity = this.paper_main_object.opacity * 1.04; + } else{ + this.paper_main_object.opacity = 1; + } + this.handlePaperVisibilityOnAfterEnginUpdate() },