I’m trying to use the viewPortEnter event handler to change the formatting of a menu item so that basically even when scrolling through a page a relevant menu item will highlight. and i have it working except it highlights the menu item no matter how small a part of the strip is on the screen. is is possible to have it only fire the event when the whole strip is visible. The code I have right now is:
export function ucTeamsIntStrip_viewportEnter ( event ) {
$w ( “#PinTIBtn” ). style . backgroundColor = “#689ADE” ;
$w ( “#PinTIBtn” ). style . foregroundColor = “#ffffff”
}
export function ucTeamsIntStrip_viewportLeave ( event ) {
$w ( “#PinTIBtn” ). style . backgroundColor = “#E5EBFA” ;
$w ( “#PinTIBtn” ). style . foregroundColor = “#0069FF”
}