Closed colossatr0n closed 5 years ago
I was able to circumvent the issue by firing a resize event in ngOnInit
after creating the basicScroll options:
ngOnInit() {
this.modifier = 30;
this.bsOptions = {
from: 'top-bottom',
to: 'bottom-top',
track: true,
props: {
'--translateY': {
from: 0,
to: `${ 10 * this.modifier }px`,
direct: true
}
}
};
window.dispatchEvent(new Event('resize'));
}
I'm using basicScroll with Angular through ngx-basicscroll. I'm able to get parallax working correctly, except for the initial parallax image placement. For some reason, the parallax image initially sits below where it should appear, but if I resize the screen even just a bit, it'll be at its correct placement.
Not sure if this is an Angular issue or a basicScroll issue.
Thanks.