我的组件文件有以下代码
@ViewChild('clusterCard', { static: false }) clusterCard: ElementRef;
highLightTheClusterCard(point: PickupClusterPoint) {
if (point) {
const card: HTMLElement = _get(this.clusterCard, 'nativeElement');
const selectedPoint: PositioningPoint = this.lane.data.selectedPostioningPoint;
/* if card is available, position point of the card and the cluster is same and infowindow over the cluster is open then
highlight the card */
if (card && _isEqual(point.pointData, selectedPoint) && point.openInfoWindow) {
card.scrollIntoView();
card['style'].borderLeft = `5px solid ${this.lane.data.color || 'transparent'}`;
} else {
card['style'].borderLeft = `5px solid transparent`;
}
}
}
ngAfterViewChecked(): …Run Code Online (Sandbox Code Playgroud)