Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicola Lanzilotto committed Apr 30, 2024
1 parent 53f2122 commit a0e3a55
Showing 1 changed file with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,35 +133,35 @@ export class WsRequestsUnservedComponent extends WsSharedComponent implements On
}

ngOnChanges(changes: SimpleChanges) {
this.logger.log('[WS-REQUEST-UNSERVED] from @Input »»» WebSocketJs WF - wsRequestsUnserved', this.wsRequestsUnserved)
this.logger.log('[WS-REQUEST-UNSERVED] ngOnChanges changes', changes)

if (changes.current_selected_prjct || changes.ws_requests_length && changes.ws_requests_length.previousValue === 0 || changes.ws_requests_length.previousValue === undefined) {
// this.logger.log('[WS-REQUESTS-LIST][SERVED] ngOnChanges changes.current_selected_prjct ', changes.current_selected_prjct)
// this.logger.log('[WS-REQUESTS-LIST][SERVED] ngOnChanges changes.ws_requests_length.previousValue ', changes.ws_requests_length.previousValue)
this.logger.log('[WS-REQUEST-UNSERVED] ngOnChanges here 1', changes)

if (this.wsRequestsUnserved.length > 0) {
this.logger.log('[WS-REQUEST-UNSERVED] ngOnChanges here 2', changes)
setTimeout(() => {
scrollToWithAnimation(
this.scrollEl, // element to scroll
'scrollTop', // direction to scroll
+this.scrollYposition, // target scrollY (0 means top of the page)
500, // duration in ms
'easeInOutCirc',
// Can be a name of the list of 'Possible easing equations' or a callback
// that defines the ease. # http://gizma.com/easing/
() => { // callback function that runs after the animation (optional)
this.logger.log('done!')
}
);
}, 100);
this.logger.log('[WS-REQUEST-UNSERVED] from @Input »»» WebSocketJs WF - wsRequestsUnserved', this.wsRequestsUnserved)
this.logger.log('[WS-REQUEST-UNSERVED] ngOnChanges changes', changes)


if (changes.current_selected_prjct || changes.ws_requests_length && changes.ws_requests_length.previousValue === 0 || changes.ws_requests_length.previousValue === undefined) {
// this.logger.log('[WS-REQUESTS-LIST][SERVED] ngOnChanges changes.current_selected_prjct ', changes.current_selected_prjct)
// this.logger.log('[WS-REQUESTS-LIST][SERVED] ngOnChanges changes.ws_requests_length.previousValue ', changes.ws_requests_length.previousValue)
this.logger.log('[WS-REQUEST-UNSERVED] ngOnChanges here 1', changes)

if (this.wsRequestsUnserved.length > 0) {
this.logger.log('[WS-REQUEST-UNSERVED] ngOnChanges here 2', changes)
setTimeout(() => {
scrollToWithAnimation(
this.scrollEl, // element to scroll
'scrollTop', // direction to scroll
+this.scrollYposition, // target scrollY (0 means top of the page)
500, // duration in ms
'easeInOutCirc',
// Can be a name of the list of 'Possible easing equations' or a callback
// that defines the ease. # http://gizma.com/easing/

() => { // callback function that runs after the animation (optional)
this.logger.log('done!')
}
);
}, 100);

}
}
}

}

Expand All @@ -172,7 +172,7 @@ export class WsRequestsUnservedComponent extends WsSharedComponent implements On
}





// -------------------------------------------------------------
Expand Down

0 comments on commit a0e3a55

Please sign in to comment.