Dataset Profile editor . Scroll timing Fix

This commit is contained in:
Kristian Ntavidi 2021-03-23 13:52:33 +02:00
parent 5e77f78a1c
commit b6236b7e0d
2 changed files with 26 additions and 16 deletions

View File

@ -44,4 +44,16 @@ export const STEPPER_ANIMATIONS = [
animate('600ms ease-in', style({opacity:0.3}))
])
])
];
];
export const GENERAL_ANIMATIONS = [
trigger('enterIn',[
transition(':enter',[
style({
transform:'scale(0)',
'transform-origin':'50% 0',
opacity:0
}),
animate('800ms ease', style({transform:'scale(1)', opacity:1}))
])
])
]

View File

@ -137,23 +137,21 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
let el = this.myElement.nativeElement.querySelector("#"+this.idprefix+id);
// let el = this.myElement.nativeElement.getElementbyId (this.selectedFieldSetId);
if(el){
if(el){
/*
Give time to template to build itself (extending and collapsing).
In case we are dragging from one container to another, then the ui takes around 600ms to build
individual previews (dataset-profile-editor-field.component.ts);
/*
Give time to template to build itself (extending and collapsing).
In case we are dragging from one container to another, then the ui takes around 600ms to build
individual previews (dataset-profile-editor-field.component.ts);
*/
setTimeout(() => {
const el = this.myElement.nativeElement.querySelector("#"+this.idprefix+id);
if(el){
el.scrollIntoView({behavior: "smooth"});
}
}, 1100);
}else{
this._scrollOnTop();
}
*/
setTimeout(() => {
const el = this.myElement.nativeElement.querySelector("#"+this.idprefix+id);
if(el){
el.scrollIntoView({behavior: "smooth"});
}
}, 700);
}
}
private _scrollOnTop(){