Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tinayuangao committed Dec 2, 2016
1 parent d41694c commit c8dc081
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
28 changes: 0 additions & 28 deletions src/lib/core/ripple/ripple.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,34 +198,6 @@ describe('MdRipple', () => {

rippleElement.dispatchEvent(createMouseEvent('mousedown'));
expect(rippleBackground.classList).not.toContain('md-ripple-active');

it('create ripple with correct position when page is scrolled', () => {
let elementTop = 600;
let elementLeft = 750;
let pageScrollTop = 500;
let pageScrollLeft = 500;
let left = 50;
let top = 75;

// Add a very large element to make the page scroll
let veryLargeElement = document.createElement('div');
veryLargeElement.style.width = '4000px';
veryLargeElement.style.height = '4000px';
document.body.appendChild(veryLargeElement);
document.body.scrollTop = pageScrollTop;
document.body.scrollLeft = pageScrollLeft;

rippleElement.style.position = 'absolute';
rippleElement.style.left = `${elementLeft}px`;
rippleElement.style.top = `${elementTop}px`;

// Simulate a keyboard-triggered click by setting event coordinates to 0.
const clickEvent = createMouseEvent('click', {
clientX: left + elementLeft - pageScrollLeft,
clientY: top + elementTop - pageScrollTop,
screenX: left + elementLeft,
screenY: top + elementTop
});
});

describe('when page is scrolled', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tabs/tab-group.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Component, ViewChild} from '@angular/core';
import {By} from '@angular/platform-browser';
import {Observable} from 'rxjs/Observable';
import {MdTab} from './tab';
import {LayoutDirection, Dir} from '../core/rtl/dir';
import {Dir} from '../core/rtl/dir';
import {ViewportRuler} from '../core/overlay/position/viewport-ruler';


Expand Down

0 comments on commit c8dc081

Please sign in to comment.