1class TimelineItem{ 2 constructor(timelineItem){ 3 this.timelineItem = timelineItem; 4 this.scrollToTop = this.getScrollTop(); 5 this.isBlack = false; 6 } 7 8 getScrollTop(){ 9 // px number to top of viewport 10 const viewportTop = this.timelineItem.getBoundingClientRect().top; 11 const documentTop = document.body.getBoundingClientRect().top; 12 const scrollTopVal = viewportTop - documentTop; 13 return scrollTopVal; 14 } 15 16 setScrollTop(scroll){ 17 this.scrollToTop(scroll); 18 } 19 20 changeColor(isOverSeparator){ 21 return isOverSeparator?this.changeToBlack():this.changeToGray(); 22 } 23 24 changeToBlack(){ 25 if(this.isBlack) return; 26 27 this.timelineItem.classList.add('is-over-separator'); 28 29 this.isBlack = true; 30 } 31 32 changeToGray(){ 33 if(!this.isBlack) return; 34 35 this.timelineItem.classList.remove('is-over-separator'); 36 37 this.isBlack = false; 38 } 39}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.