Skip to content

Commit 0bf0cc1

Browse files
committed
chore(*): rename pane and siblingPane to startPane and endPane
1 parent 2425e6d commit 0bf0cc1

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

src/components/splitter/splitter.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import type { SplitterOrientation } from '../types.js';
2222
import { styles } from './themes/splitter.base.css.js';
2323

2424
export interface IgcSplitterBarResizeEventArgs {
25-
pane: HTMLElement;
26-
sibling: HTMLElement;
25+
startPane: HTMLElement;
26+
endPane: HTMLElement;
2727
}
2828

2929
export interface IgcSplitterComponentEventMap {
@@ -408,7 +408,7 @@ export default class IgcSplitterComponent extends EventEmitterMixin<
408408
};
409409
// TODO: are these event args needed?
410410
this.emitEvent('igcResizeStart', {
411-
detail: { pane: this._startPane, sibling: this._endPane },
411+
detail: { startPane: this._startPane, endPane: this._endPane },
412412
});
413413
}
414414

@@ -449,13 +449,13 @@ export default class IgcSplitterComponent extends EventEmitterMixin<
449449
}
450450

451451
private _resizing(delta: number) {
452-
const [paneSize, siblingSize] = this._calcNewSizes(delta);
452+
const [startPaneSize, endPaneSize] = this._calcNewSizes(delta);
453453

454-
this.startSize = `${paneSize}px`;
455-
this.endSize = `${siblingSize}px`;
454+
this.startSize = `${startPaneSize}px`;
455+
this.endSize = `${endPaneSize}px`;
456456

457457
this.emitEvent('igcResizing', {
458-
detail: { pane: this._startPane, sibling: this._endPane },
458+
detail: { startPane: this._startPane, endPane: this._endPane },
459459
});
460460
}
461461

@@ -470,13 +470,16 @@ export default class IgcSplitterComponent extends EventEmitterMixin<
470470

471471
private _resizeEnd(delta: number) {
472472
if (!this._resizeState) return;
473-
const [paneSize, siblingSize] = this._calcNewSizes(delta);
473+
const [startPaneSize, endPaneSize] = this._calcNewSizes(delta);
474474

475-
this.startSize = this._computeSize(this._resizeState.startPane, paneSize);
476-
this.endSize = this._computeSize(this._resizeState.endPane, siblingSize);
475+
this.startSize = this._computeSize(
476+
this._resizeState.startPane,
477+
startPaneSize
478+
);
479+
this.endSize = this._computeSize(this._resizeState.endPane, endPaneSize);
477480

478481
this.emitEvent('igcResizeEnd', {
479-
detail: { pane: this._startPane, sibling: this._endPane },
482+
detail: { startPane: this._startPane, endPane: this._endPane },
480483
});
481484
this._resizeState = null;
482485
}

0 commit comments

Comments
 (0)