scrollService fix
parent
164200532c
commit
7be11672a5
|
|
@ -2,7 +2,6 @@ import {Component} from '@angular/core';
|
|||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {FormControl, FormGroup} from "@angular/forms";
|
||||
import {FormsService, ListsService} from "@app/_services";
|
||||
import {WindowScrollingService} from "@app/_services/window-scrolling.service";
|
||||
import { PagesService } from '@app/_services/pages.service';
|
||||
|
||||
|
||||
|
|
@ -32,7 +31,6 @@ export class SliderFormComponent {
|
|||
private formsService: FormsService,
|
||||
private listsService: ListsService,
|
||||
private pagesService: PagesService,
|
||||
private windowScrollingService: WindowScrollingService
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
@ -57,7 +55,6 @@ export class SliderFormComponent {
|
|||
this.initFormGroup(JSON.parse(this.route.snapshot.queryParamMap.get('extraProps')));
|
||||
this.formParams = JSON.parse(this.route.snapshot.queryParamMap.get('formParams')) || {};
|
||||
this.fetch();
|
||||
this.windowScrollingService.disable();
|
||||
}
|
||||
|
||||
fetch() {
|
||||
|
|
@ -146,7 +143,7 @@ export class SliderFormComponent {
|
|||
}
|
||||
|
||||
close() {
|
||||
this.windowScrollingService.enable();
|
||||
this.router.navigate([{outlets: {slider: null}}]).then();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { AfterViewInit, Component, Input, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { WindowScrollingService } from '@app/_services/window-scrolling.service';
|
||||
|
||||
@Component({
|
||||
selector: 'slider',
|
||||
|
|
@ -10,18 +11,24 @@ export class SliderComponent implements OnInit {
|
|||
@Input() width: 'string';
|
||||
@Input() side: 'left'|'right' ='right';
|
||||
|
||||
|
||||
css:any;
|
||||
|
||||
constructor(
|
||||
private windowScrollingService: WindowScrollingService,
|
||||
private router:Router
|
||||
){}
|
||||
|
||||
ngOnInit(){
|
||||
this.windowScrollingService.disable();
|
||||
this.css = {
|
||||
'left-side': this.side=='left',
|
||||
'right-side': this.side=='right'
|
||||
}
|
||||
}
|
||||
ngOnDestroy(){
|
||||
this.windowScrollingService.enable();
|
||||
}
|
||||
|
||||
|
||||
close() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue