Skip to content

Commit ab2dbb6

Browse files
and-oliDevtools-frontend LUCI CQ
authored andcommitted
Fix typo in rpp
dimention -> dimension Bug: none Change-Id: I6c32c8b2e43f7adee420cda8176858ca24d3d614 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6179455 Commit-Queue: Nancy Li <[email protected]> Reviewed-by: Nancy Li <[email protected]> Auto-Submit: Andres Olivares <[email protected]>
1 parent ba801f1 commit ab2dbb6

File tree

3 files changed

+35
-35
lines changed

3 files changed

+35
-35
lines changed

front_end/panels/timeline/overlays/OverlaysImpl.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ export class Overlays extends EventTarget {
561561
const component = linkInProgressElement.querySelector('devtools-entries-link-overlay') as
562562
Components.EntriesLinkOverlay.EntriesLinkOverlay;
563563
const yCoordinate = mouseEvent.offsetY + ((chart === 'main') ? networkHeight : 0);
564-
component.toEntryCoordinateAndDimentions = {x: mouseEvent.offsetX, y: yCoordinate};
564+
component.toEntryCoordinateAndDimensions = {x: mouseEvent.offsetX, y: yCoordinate};
565565
}
566566
}
567567

@@ -1079,7 +1079,7 @@ export class Overlays extends EventTarget {
10791079
fromEntryX = fromEntryParams?.x;
10801080
fromEntryY = fromEntryParams?.y;
10811081

1082-
component.fromEntryCoordinateAndDimentions =
1082+
component.fromEntryCoordinateAndDimensions =
10831083
{x: fromEntryX, y: fromEntryY, length: fromEntryWidth, height: fromEntryHeight - fromCutOffHeight};
10841084
} else {
10851085
// Something went if the entry is visible and we cannot get its' parameters.
@@ -1093,7 +1093,7 @@ export class Overlays extends EventTarget {
10931093
this.dispatchEvent(new AnnotationOverlayActionEvent(overlay, 'Remove'));
10941094
}
10951095

1096-
// If entryTo exists, pass the coordinates and dimentions of the entry that the arrow snaps to.
1096+
// If entryTo exists, pass the coordinates and dimensions of the entry that the arrow snaps to.
10971097
// If it does not, the event tracking mouse coordinates updates 'to coordinates' so the arrow follows the mouse instead.
10981098
const entryToWrapper = component.entryToWrapper();
10991099

@@ -1112,7 +1112,7 @@ export class Overlays extends EventTarget {
11121112
toEntryX = toEntryParams?.x;
11131113
toEntryY = toEntryParams?.y;
11141114

1115-
component.toEntryCoordinateAndDimentions = {
1115+
component.toEntryCoordinateAndDimensions = {
11161116
x: toEntryX,
11171117
y: toEntryY,
11181118
length: toEntryWidth,

front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ export class EntryLinkStartCreating extends Event {
3333
export class EntriesLinkOverlay extends HTMLElement {
3434
readonly #shadow = this.attachShadow({mode: 'open'});
3535
#coordinateFrom: {x: number, y: number};
36-
#fromEntryDimentions: {width: number, height: number};
36+
#fromEntryDimensions: {width: number, height: number};
3737
#coordinateTo: {x: number, y: number};
38-
#toEntryDimentions: {width: number, height: number}|null = null;
38+
#toEntryDimensions: {width: number, height: number}|null = null;
3939
#connectorLineContainer: SVGAElement|null = null;
4040
#connector: SVGLineElement|null = null;
4141
#entryFromWrapper: HTMLElement|null = null;
@@ -56,16 +56,16 @@ export class EntriesLinkOverlay extends HTMLElement {
5656
#linkState: Trace.Types.File.EntriesLinkState;
5757

5858
constructor(
59-
initialFromEntryCoordinateAndDimentions: {x: number, y: number, width: number, height: number},
59+
initialFromEntryCoordinateAndDimensions: {x: number, y: number, width: number, height: number},
6060
linkCreationNotStartedState: Trace.Types.File.EntriesLinkState) {
6161
super();
6262
this.#render();
63-
this.#coordinateFrom = {x: initialFromEntryCoordinateAndDimentions.x, y: initialFromEntryCoordinateAndDimentions.y};
64-
this.#fromEntryDimentions = {
65-
width: initialFromEntryCoordinateAndDimentions.width,
66-
height: initialFromEntryCoordinateAndDimentions.height,
63+
this.#coordinateFrom = {x: initialFromEntryCoordinateAndDimensions.x, y: initialFromEntryCoordinateAndDimensions.y};
64+
this.#fromEntryDimensions = {
65+
width: initialFromEntryCoordinateAndDimensions.width,
66+
height: initialFromEntryCoordinateAndDimensions.height,
6767
};
68-
this.#coordinateTo = {x: initialFromEntryCoordinateAndDimentions.x, y: initialFromEntryCoordinateAndDimentions.y};
68+
this.#coordinateTo = {x: initialFromEntryCoordinateAndDimensions.x, y: initialFromEntryCoordinateAndDimensions.y};
6969
this.#connectorLineContainer = this.#shadow.querySelector<SVGAElement>('.connectorContainer') ?? null;
7070
this.#connector = this.#connectorLineContainer?.querySelector('line') ?? null;
7171
this.#entryFromWrapper = this.#shadow.querySelector('.from-highlight-wrapper') ?? null;
@@ -110,9 +110,9 @@ export class EntriesLinkOverlay extends HTMLElement {
110110
}
111111
}
112112

113-
set fromEntryCoordinateAndDimentions(fromEntryParams: {x: number, y: number, length: number, height: number}) {
113+
set fromEntryCoordinateAndDimensions(fromEntryParams: {x: number, y: number, length: number, height: number}) {
114114
this.#coordinateFrom = {x: fromEntryParams.x, y: fromEntryParams.y};
115-
this.#fromEntryDimentions = {width: fromEntryParams.length, height: fromEntryParams.height};
115+
this.#fromEntryDimensions = {width: fromEntryParams.length, height: fromEntryParams.height};
116116
this.#updateCreateLinkBox();
117117
this.#redrawConnectionArrow();
118118
}
@@ -125,12 +125,12 @@ export class EntriesLinkOverlay extends HTMLElement {
125125

126126
// The arrow might be pointing either to an entry or an empty space.
127127
// If the dimensions are not passed, it is pointing at an empty space.
128-
set toEntryCoordinateAndDimentions(toEntryParams: {x: number, y: number, length?: number, height?: number}) {
128+
set toEntryCoordinateAndDimensions(toEntryParams: {x: number, y: number, length?: number, height?: number}) {
129129
this.#coordinateTo = {x: toEntryParams.x, y: toEntryParams.y};
130130
if (toEntryParams.length && toEntryParams.height) {
131-
this.#toEntryDimentions = {width: toEntryParams.length, height: toEntryParams.height};
131+
this.#toEntryDimensions = {width: toEntryParams.length, height: toEntryParams.height};
132132
} else {
133-
this.#toEntryDimentions = null;
133+
this.#toEntryDimensions = null;
134134
}
135135

136136
this.#updateCreateLinkBox();
@@ -177,9 +177,9 @@ export class EntriesLinkOverlay extends HTMLElement {
177177
// we aren't drawing the arrows, so it doesn't make sense to draw the
178178
// connectors.
179179
const drawFromEntryConnectorCircle = this.#entryFromVisible && !this.#arrowHidden && this.#fromEntryIsSource &&
180-
this.#fromEntryDimentions.width >= minWidthToDrawConnectorCircles;
180+
this.#fromEntryDimensions.width >= minWidthToDrawConnectorCircles;
181181

182-
const widthOfToEntry = this.#toEntryDimentions?.width ?? 0;
182+
const widthOfToEntry = this.#toEntryDimensions?.width ?? 0;
183183
const drawToEntryConnectorCircle = !this.#arrowHidden && this.#entryToVisible && this.#toEntryIsSource &&
184184
widthOfToEntry >= minWidthToDrawConnectorCircles && !this.#arrowHidden;
185185

@@ -188,9 +188,9 @@ export class EntriesLinkOverlay extends HTMLElement {
188188

189189
// If the entry is visible, the entry arrow starts from the middle of the right edge of the entry (end on the X axis and middle of the Y axis).
190190
// If not, draw it to the y coordinate of the entry and the edge of the timeline so it is pointing in the direction of the entry.
191-
const halfFromEntryHeight = this.#fromEntryDimentions.height / 2;
191+
const halfFromEntryHeight = this.#fromEntryDimensions.height / 2;
192192
if (this.#entryFromVisible) {
193-
const endConnectionPointX = String(this.#coordinateFrom.x + this.#fromEntryDimentions.width);
193+
const endConnectionPointX = String(this.#coordinateFrom.x + this.#fromEntryDimensions.width);
194194
const endConnectionPointY = String(this.#coordinateFrom.y + halfFromEntryHeight);
195195

196196
this.#connector.setAttribute('x1', endConnectionPointX);
@@ -200,17 +200,17 @@ export class EntriesLinkOverlay extends HTMLElement {
200200
this.#entryFromConnector.setAttribute('cy', endConnectionPointY);
201201
this.#entryFromWrapper.style.visibility = 'visible';
202202
} else {
203-
this.#connector.setAttribute('x1', (this.#coordinateFrom.x + this.#fromEntryDimentions.width).toString());
203+
this.#connector.setAttribute('x1', (this.#coordinateFrom.x + this.#fromEntryDimensions.width).toString());
204204
this.#connector.setAttribute('y1', String(this.#coordinateFrom.y + halfFromEntryHeight));
205205
this.#entryFromWrapper.style.visibility = 'hidden';
206206
}
207207

208208
// If the arrow is pointing to the entry and that entry is visible, point it to the middle of the entry.
209209
// If the entry is not visible, point the arrow to the edge of the screen towards the entry.
210210
// Otherwise, the arrow is following the mouse so we assign it to the provided coordinates.
211-
if (this.#toEntryDimentions && this.#entryToVisible) {
211+
if (this.#toEntryDimensions && this.#entryToVisible) {
212212
const connectionPointX = String(this.#coordinateTo.x);
213-
const connectionPointY = String(this.#coordinateTo.y + this.#toEntryDimentions.height / 2);
213+
const connectionPointY = String(this.#coordinateTo.y + this.#toEntryDimensions.height / 2);
214214

215215
this.#connector.setAttribute('x2', connectionPointX);
216216
this.#connector.setAttribute('y2', connectionPointY);
@@ -222,10 +222,10 @@ export class EntriesLinkOverlay extends HTMLElement {
222222
} else {
223223
this.#entryToWrapper.style.visibility = 'hidden';
224224
this.#connector.setAttribute('x2', this.#coordinateTo.x.toString());
225-
// If `toEntryDimentions` exist, the arrow points to the entry and we need to take its height into account.
225+
// If `toEntryDimensions` exist, the arrow points to the entry and we need to take its height into account.
226226
// Otherwise, it is following the mouse.
227-
if (this.#toEntryDimentions) {
228-
const halfToEntryHeight = this.#toEntryDimentions.height / 2;
227+
if (this.#toEntryDimensions) {
228+
const halfToEntryHeight = this.#toEntryDimensions.height / 2;
229229
this.#connector.setAttribute('y2', String(this.#coordinateTo.y + halfToEntryHeight));
230230
} else {
231231
this.#connector.setAttribute('y2', (this.#coordinateTo.y).toString());
@@ -234,9 +234,9 @@ export class EntriesLinkOverlay extends HTMLElement {
234234

235235
this.#connector.setAttribute('stroke-width', '2');
236236

237-
if (this.#toEntryDimentions && this.#entryFromVisible && !this.#entryToVisible) {
237+
if (this.#toEntryDimensions && this.#entryFromVisible && !this.#entryToVisible) {
238238
this.#connector.setAttribute('stroke', 'url(#fromVisibleLineGradient)');
239-
} else if (this.#toEntryDimentions && this.#entryToVisible && !this.#entryFromVisible) {
239+
} else if (this.#toEntryDimensions && this.#entryToVisible && !this.#entryFromVisible) {
240240
this.#connector.setAttribute('stroke', 'url(#toVisibleLineGradient)');
241241
} else {
242242
const arrowColor = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-text-primary');
@@ -260,15 +260,15 @@ export class EntriesLinkOverlay extends HTMLElement {
260260
return 100;
261261
}
262262

263-
const lineLength = this.#coordinateTo.x - (this.#coordinateFrom.x + this.#fromEntryDimentions.width);
263+
const lineLength = this.#coordinateTo.x - (this.#coordinateFrom.x + this.#fromEntryDimensions.width);
264264
let visibleLineLength = 0;
265265

266266
// If the visible entry is the 'From' entry, find the length of the visible arrow by
267-
// substracting the point where the arrow starts from the whole canvas length.
267+
// subtracting the point where the arrow starts from the whole canvas length.
268268
// If the 'to' entry is visible, the coordinate of the entry will be equal to
269269
// the visible arrow length.
270270
if (this.#entryFromVisible && !this.#entryToVisible) {
271-
visibleLineLength = this.#canvasRect.width - (this.#coordinateFrom.x + this.#fromEntryDimentions.width);
271+
visibleLineLength = this.#canvasRect.width - (this.#coordinateFrom.x + this.#fromEntryDimensions.width);
272272
} else if (!this.#entryFromVisible && this.#entryToVisible) {
273273
visibleLineLength = this.#coordinateTo.x;
274274
}
@@ -292,7 +292,7 @@ export class EntriesLinkOverlay extends HTMLElement {
292292
return;
293293
}
294294

295-
createLinkIcon.style.left = `${this.#coordinateFrom.x + this.#fromEntryDimentions.width}px`;
295+
createLinkIcon.style.left = `${this.#coordinateFrom.x + this.#fromEntryDimensions.width}px`;
296296
createLinkIcon.style.top = `${this.#coordinateFrom.y}px`;
297297
}
298298

@@ -351,7 +351,7 @@ export class EntriesLinkOverlay extends HTMLElement {
351351
fill-opacity="1"
352352
refX="4"
353353
refY="2"
354-
visibility=${this.#entryToVisible || !this.#toEntryDimentions ? 'visible' : 'hidden'}>
354+
visibility=${this.#entryToVisible || !this.#toEntryDimensions ? 'visible' : 'hidden'}>
355355
<path d="M0,0 V4 L4,2 Z" fill=${arrowColor} />
356356
</marker>
357357
</defs>

front_end/ui/legacy/components/perf_ui/FlameChart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3786,7 +3786,7 @@ export class FlameChart extends Common.ObjectWrapper.eventMixin<EventTypes, type
37863786
}
37873787

37883788
/**
3789-
* Update position of an Element. By default, the element is treated as a full entry and it's dimentions are set to the full entry width/length/height.
3789+
* Update position of an Element. By default, the element is treated as a full entry and it's dimensions are set to the full entry width/length/height.
37903790
* If isDecoration parameter is set to true, the element will be positioned on the right side of the entry and have a square shape where width == height of the entry.
37913791
*/
37923792
private updateElementPosition(element: Element|null, entryIndex: number, isDecoration?: boolean): void {

0 commit comments

Comments
 (0)