Skip to content

Commit

Permalink
fix(refresher): border should only show when pulled
Browse files Browse the repository at this point in the history
  • Loading branch information
Manduro committed Jun 12, 2017
1 parent d0847aa commit ccf0d7f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/content/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ export class Content extends Ion implements OnDestroy, AfterViewInit, IContent {
/** @internal */
_fullscreen: boolean;
/** @internal */
_hasRefresher: boolean = false;
/** @internal */
_footerEle: HTMLElement;
/** @internal */
_dirty: boolean;
Expand Down Expand Up @@ -782,6 +784,11 @@ export class Content extends Ion implements OnDestroy, AfterViewInit, IContent {
this._cBottom += this._tabbarHeight;
}

// Refresher uses a border which should be hidden unless pulled
if (this._hasRefresher === true) {
this._cTop -= 1;
}

// Fixed content shouldn't include content padding
this._fTop = this._cTop;
this._fBottom = this._cBottom;
Expand Down
1 change: 1 addition & 0 deletions src/components/refresher/refresher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ export class Refresher {

constructor(private _plt: Platform, @Host() private _content: Content, private _zone: NgZone, gestureCtrl: GestureController) {
this._events = new UIEventManager(_plt);
_content._hasRefresher = true;
_content.setElementClass('has-refresher', true);
this._gesture = gestureCtrl.createGesture({
name: GESTURE_REFRESHER,
Expand Down
3 changes: 3 additions & 0 deletions src/components/refresher/test/refresher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ describe('Refresher', () => {

});

it('should set hasRefresher on content', () => {
expect(content._hasRefresher).toBeTruthy();
});

let contentElementRef: any;
let refresher: Refresher;
Expand Down

0 comments on commit ccf0d7f

Please sign in to comment.