Hi guys,
I have a bit confusing problem. At least it is confusing for me.
I am trying to build a Notification Window:
I press a Button → A Window pops up.
So far not a big deal. But what a bad web developer would I be, if there isnt a nice animation, how the window comes in and leaves my page.
So I have my Keyframes here:
@-webkit-keyframes window-open { 0% { -webkit-transform: scale(0); transform: scale(0); -webkit-transform-origin: 100% 0%; transform-origin: 100% 0%; opacity: 1; } 100% { -webkit-transform: scale(1); transform: scale(1); -webkit-transform-origin: 100% 0%; transform-origin: 100% 0%; opacity: 1; } } @keyframes window-open { 0% { -webkit-transform: scale(0); transform: scale(0); -webkit-transform-origin: 100% 0%; transform-origin: 100% 0%; opacity: 1; } 100% { -webkit-transform: scale(1); transform: scale(1); -webkit-transform-origin: 100% 0%; transform-origin: 100% 0%; opacity: 1; } } @-webkit-keyframes window-close { 0% { -webkit-transform: scale(1); transform: scale(1); -webkit-transform-origin: 100% 0%; transform-origin: 100% 0%; opacity: 1; } 100% { -webkit-transform: scale(0); transform: scale(0); -webkit-transform-origin: 100% 0%; transform-origin: 100% 0%; opacity: 1; } } @keyframes window-close { 0% { -webkit-transform: scale(1); transform: scale(1); -webkit-transform-origin: 100% 0%; transform-origin: 100% 0%; opacity: 1; } 100% { -webkit-transform: scale(0); transform: scale(0); -webkit-transform-origin: 100% 0%; transform-origin: 100% 0%; opacity: 1; } }
Got a hastebin for you:
https://hastebin.com/otufacetez.css
And adding it to my scss selector like that:
.nav-header-popup.v-window { […]
&.v-window-animate-in { @include animation(window-open 0.2s 0s); } &.v-window-animate-out { @include animation(window-close 0.2x 0s); } }
Another hastebin:
https://hastebin.com/ejekaposum.coffeescript
But, after I opened the Window by “UI.getCurrent().addWindow(w);”, I somehow can’t close it anymore.
Not with “w.close();” and not with “UI.getCurrent().removeWindow(w);”.
So it looks for my like that the window is not attached to the UI. But how can this happen?
Or is it just me, who made the mistake?
Or does someone know the solution to that problem.
Thanks in advance
Lucas