animation bug

This commit is contained in:
insanity
2018-10-23 23:04:01 +09:00
parent 4771ce8279
commit 256124a58d
5 changed files with 34 additions and 14 deletions

View File

@@ -5,7 +5,8 @@ import {
} from '@angular/core';
import { trigger, state, style, transition, animate, AnimationEvent } from '@angular/animations';
import { DomHandler } from 'primeng/primeng';
import { Store } from '@ngrx/store';
import * as UILayoutStore from 'src/app/store/ui/layout';
@Component({
selector: 'of-p-popupPanel',
@@ -60,7 +61,7 @@ export class PopupPanelComponent implements OnDestroy {
blockUIVisible = false;
constructor(public el: ElementRef, public domHandler: DomHandler, public renderer: Renderer2) { }
constructor(public el: ElementRef, public domHandler: DomHandler, public renderer: Renderer2, private store: Store<any>, ) { }
toggle(event) {
if (this.visible) {
@@ -76,6 +77,10 @@ export class PopupPanelComponent implements OnDestroy {
this.target = event.currentTarget;
this.visible = true;
this.preventDocumentDefault = true;
/////
this.store.dispatch(new UILayoutStore.ChangeBlockPagesContent({ blockPagesContent: true }));
}
onOverlayAnimationStart(event: AnimationEvent) {
@@ -125,6 +130,7 @@ export class PopupPanelComponent implements OnDestroy {
hide() {
this.visible = false;
this.store.dispatch(new UILayoutStore.ChangeBlockPagesContent({ blockPagesContent: false }));
}
onWindowResize() {