Changeset 248134 in webkit
- Timestamp:
- Aug 1, 2019 2:45:42 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r248117 r248134 1 2019-08-01 Zhifei Fang <zhifei_fang@apple.com> 2 3 [results.webkit.org] Timeline.CanvasXAxisComponent height should be defined by option 4 https://bugs.webkit.org/show_bug.cgi?id=200321 5 6 Reviewed by Jonathan Bedard. 7 8 *resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js: 9 Let the axis' height be defined in the option. Timeine component will use this value as 10 padding-top for headers which allows headers start in the right position, even with multiple 11 top axises. 12 (Timeline.CanvasSeriesComponent): 13 (prototype.Timeline.CanvasContainer): 14 1 15 2019-08-01 Zhifei Fang <zhifei_fang@apple.com> 2 16 -
trunk/Tools/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js
r248117 r248134 510 510 const scaleBroadLineHeight = parseInt(computedStyle.getPropertyValue('--tinySize')) / 2; 511 511 const maxinumTextHeight = scaleWidth * 4.5; 512 const canvasHeight = parseInt(computedStyle.getPropertyValue('--smallSize')) * 4;512 const canvasHeight = typeof option.height === "number" ? option.height : parseInt(computedStyle.getPropertyValue('--smallSize')) * 5; 513 513 const sqrt3 = Math.sqrt(3); 514 514 … … 733 733 </div>`; 734 734 }), 735 isAxis: true // Mark self as an axis 735 isAxis: true, // Mark self as an axis, 736 height: canvasHeight, // Expose Height to parent 736 737 }; 737 738 } 738 739 739 740 Timeline.CanvasContainer = (exporter, ...children) => { 740 const hasTopXAxis = children[0].isAxis; 741 let headerAxisPlaceHolderHeight = 0; 742 let topAxis = true; 741 743 const upackChildren = (children) => { 742 744 const headers = []; … … 750 752 headers.push(child.header); 751 753 serieses.push(child.series); 754 if (child.isAxis && topAxis) 755 headerAxisPlaceHolderHeight += child.height; 756 else if (topAxis) 757 topAxis = false; 752 758 }); 753 759 return {headers, serieses}; … … 764 770 return ( 765 771 `<div class="timeline"> 766 <div class="header ${hasTopXAxis ? "with-top-x-axis" : ""}">772 <div class="header" style="padding-top:${headerAxisPlaceHolderHeight}px"> 767 773 ${ListComponent(composer, ...headers)} 768 774 </div>
Note: See TracChangeset
for help on using the changeset viewer.