Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'../../configs/base.eslintrc.json',
'../../configs/warnings.eslintrc.json',
'../../configs/errors.eslintrc.json'
'../../configs/errors.eslintrc.json',
"prettier"
],
ignorePatterns: [
'node_modules',
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "traceviewer-react-components",
"private": true,
"version": "0.9.1",
"description": "Trace Compass react components",
"license": "MIT",
Expand Down Expand Up @@ -44,6 +45,7 @@
"@types/d3": "^7.1.0",
"@types/jest": "^28.0.0",
"@types/lodash": "^4.14.142",
"@types/lodash.debounce": "4.0.3",
"@types/react-grid-layout": "^1.1.1",
"@types/react-modal": "^3.8.2",
"@types/react-test-renderer": "^18.3.0",
Expand All @@ -57,6 +59,7 @@
"jest": "^28.1.3",
"jest-canvas-mock": "^2.4.0",
"jest-environment-jsdom": "^28.1.3",
"prettier": "^3.6.2",
"react-test-renderer": "^18.2.0",
"rimraf": "^5.0.0",
"ts-jest": "^28.0.8",
Expand All @@ -68,7 +71,6 @@
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "jest --config jest.config.json",
"watch": "tsc -b -w",
"format:write": "prettier --write ./src",
"format:check": "prettier --check ./src"
}
Expand Down
12 changes: 6 additions & 6 deletions src/components/abstract-xy-output-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,12 @@ export abstract class AbstractXYOutputComponent<
d >= 1000000000000
? Math.round(d / 100000000000) / 10 + 'G'
: d >= 1000000000
? Math.round(d / 100000000) / 10 + 'B'
: d >= 1000000
? Math.round(d / 100000) / 10 + 'M'
: d >= 1000
? Math.round(d / 100) / 10 + 'K'
: Math.round(d * 10) / 10;
? Math.round(d / 100000000) / 10 + 'B'
: d >= 1000000
? Math.round(d / 100000) / 10 + 'M'
: d >= 1000
? Math.round(d / 100) / 10 + 'K'
: Math.round(d * 10) / 10;

if (this.state.allMax > 0) {
select(this.yAxisRef.current)
Expand Down
2 changes: 1 addition & 1 deletion src/components/data-providers/tsp-data-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export class TspDataProvider {
start: arrow.start - offset,
end: arrow.end - offset
} as TimelineChart.TimeGraphRange
} as TimelineChart.TimeGraphArrow)
}) as TimelineChart.TimeGraphArrow
);
return arrows;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/timegraph-output-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,8 @@ export class TimegraphOutputComponent extends AbstractTreeOutputComponent<Timegr
return this.state.markerCategoryEntries.length <= 1
? 0
: this.state.collapsedMarkerNodes.length
? rowHeight
: this.state.markerCategoryEntries.length * rowHeight + scrollbarHeight;
? rowHeight
: this.state.markerCategoryEntries.length * rowHeight + scrollbarHeight;
}

renderTree(): React.ReactNode {
Expand Down
4 changes: 2 additions & 2 deletions src/components/utils/xy-output-component-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ export function drawSelection(params: DrawSelectionParams): void {
const { startPixel, endPixel, isBarPlot, chartArea, props, ctx, invertSelection } = params;
const minPixel = Math.min(startPixel, endPixel);
const maxPixel = Math.max(startPixel, endPixel);
const initialPoint = isBarPlot ? 0 : chartArea?.left ?? 0;
const initialPoint = isBarPlot ? 0 : (chartArea?.left ?? 0);
const chartHeight = parseInt(props.style.height.toString());
const finalPoint = isBarPlot ? chartHeight : chartArea?.bottom ?? 0;
const finalPoint = isBarPlot ? chartHeight : (chartArea?.bottom ?? 0);

if (ctx) {
ctx.save();
Expand Down
4 changes: 2 additions & 2 deletions src/components/xy-output-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ export class XYOutputComponent extends AbstractXYOutputComponent<AbstractOutputP
) {
const minPixel = Math.min(startPixel, endPixel);
const maxPixel = Math.max(startPixel, endPixel);
const initialPoint = this.isBarPlot ? 0 : chartArea?.left ?? 0;
const initialPoint = this.isBarPlot ? 0 : (chartArea?.left ?? 0);
const chartHeight = parseInt(this.props.style.height.toString());
const finalPoint = this.isBarPlot ? chartHeight : chartArea?.bottom ?? 0;
const finalPoint = this.isBarPlot ? chartHeight : (chartArea?.bottom ?? 0);
if (ctx) {
ctx.save();

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
],
"references": [
{
"path": "../base"
"path": "../traceviewer-base"
}
]
}