Changeset 250523 in webkit


Ignore:
Timestamp:
Sep 30, 2019 12:36:26 PM (5 years ago)
Author:
zhifei_fang@apple.com
Message:

[results.webkit.org Timeline] New axis style
https://bugs.webkit.org/show_bug.cgi?id=202292

Reviewed by Jonathan Bedard.

  • resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r250521 r250523  
     12019-09-30  Zhifei Fang  <zhifei_fang@apple.com>
     2
     3        [results.webkit.org Timeline] New axis style
     4        https://bugs.webkit.org/show_bug.cgi?id=202292
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        * resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
     9
    1102019-09-30  Alex Christensen  <achristensen@webkit.org>
    211
  • trunk/Tools/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js

    r250399 r250523  
    624624    const scaleTagLineHeight = parseInt(computedStyle.getPropertyValue('--smallSize'));
    625625    const scaleTagLinePadding = 10;
     626    const scaleGroupTagLinePadding = 3;
     627    const scaleGroupMargin = fontSizeNumber / 2;
    626628    const scaleBroadLineHeight = parseInt(computedStyle.getPropertyValue('--tinySize')) / 2;
    627629    const maxinumTextHeight = scaleWidth * 4.5;
     
    638640        const middlePointX = x + totalWidth / 2;
    639641        if (group > 1) {
     642            const groupBaselineY = isTop ? baseLineY - scaleBroadLineHeight : baseLineY + scaleBroadLineHeight;
    640643            colorBatchRender.lazyCreateColorSeqs(usedGroupColor, (context) => {
    641644                context.beginPath();
     
    646649            });
    647650            colorBatchRender.addSeq(usedGroupColor, (context) => {
    648                 context.moveTo(x + context.lineWidth, isTop ? canvasHeight : y);
    649                 context.lineTo(x + context.lineWidth, baseLineY);
    650                 context.moveTo(x, baseLineY);
    651                 context.lineTo(x + totalWidth, baseLineY);
    652                 context.moveTo(x + totalWidth, isTop ? canvasHeight : y);
    653                 context.lineTo(x + totalWidth, baseLineY);
    654                 context.moveTo(middlePointX, baseLineY);
     651                context.moveTo(x + scaleGroupMargin, groupBaselineY);
     652                context.lineTo(x + scaleGroupMargin, baseLineY);
     653                context.moveTo(x + scaleGroupMargin, groupBaselineY);
     654                context.lineTo(x + totalWidth - scaleGroupMargin, groupBaselineY);
     655                context.moveTo(x + totalWidth - scaleGroupMargin, groupBaselineY);
     656                context.lineTo(x + totalWidth - scaleGroupMargin, baseLineY);
     657                context.moveTo(middlePointX, groupBaselineY);
    655658                if (!isTop)
    656                     context.lineTo(middlePointX, baseLineY + scaleTagLineHeight - scaleTagLinePadding);
     659                    context.lineTo(middlePointX, groupBaselineY + scaleTagLineHeight - scaleTagLinePadding - scaleGroupTagLinePadding);
    657660                else
    658                     context.lineTo(middlePointX, baseLineY - scaleTagLineHeight + scaleTagLinePadding);
     661                    context.lineTo(middlePointX, groupBaselineY - scaleTagLineHeight + scaleTagLinePadding + scaleGroupTagLinePadding);
    659662            });
    660663        } else {
    661             colorBatchRender.lazyCreateColorSeqs(usedLineColor, (context) => {
     664            colorBatchRender.lazyCreateColorSeqs(usedGroupColor, (context) => {
    662665                context.beginPath();
    663666            }, (context, color) => {
     
    666669                context.stroke();
    667670            });
    668             colorBatchRender.addSeq(usedLineColor, (context) => {
     671            colorBatchRender.addSeq(usedGroupColor, (context) => {
    669672                context.moveTo(middlePointX, baseLineY);
    670673                if (!isTop)
Note: See TracChangeset for help on using the changeset viewer.