Skip to content

Commit

Permalink
fix(select): Update for commentS
Browse files Browse the repository at this point in the history
  • Loading branch information
williamernest committed Aug 28, 2018
1 parent 77f2470 commit 2d5963e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/mdc-select/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ class MDCSelect extends MDCComponent {
*/
setTransformOrigin_(evt) {
const targetClientRect = evt.target.getBoundingClientRect();
const xCoordinates = evt.clientX;
const normalizedX = xCoordinates - targetClientRect.left;
const xCoordinate = evt.clientX;
const normalizedX = xCoordinate - targetClientRect.left;
this.lineRipple_.setRippleCenter(normalizedX);
}
}
Expand Down
6 changes: 3 additions & 3 deletions test/unit/mdc-select/mdc-select.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ test('attachTo returns a component instance', () => {
assert.isOk(MDCSelect.attachTo(getFixture()) instanceof MDCSelect);
});

function setupTest(isOutline = false, hasLabel = true) {
function setupTest(hasOutline = false, hasLabel = true) {
const bottomLine = new FakeBottomLine();
const label = new FakeLabel();
const fixture = isOutline ? getOutlineFixture() : getFixture();
const fixture = hasOutline ? getOutlineFixture() : getFixture();
const nativeControl = fixture.querySelector('.mdc-select__native-control');
const labelEl = fixture.querySelector('.mdc-floating-label');
const bottomLineEl = fixture.querySelector('.mdc-line-ripple');
Expand Down Expand Up @@ -423,7 +423,7 @@ test('adapter#getLabelWidth returns the width of the label', () => {
assert.equal(component.getDefaultFoundation().adapter_.getLabelWidth(), LABEL_WIDTH);
});

test('adapter#getLabelWidth return 0 if the label does not exist', () => {
test('adapter#getLabelWidth returns 0 if the label does not exist', () => {
const hasOutline = true;
const hasLabel = false;
const {component} = setupTest(hasOutline, hasLabel);
Expand Down

0 comments on commit 2d5963e

Please sign in to comment.