-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from guilhermeborgesbastos/implement-gesture-r…
…ecognition Implement gesture recognition for the Experience and Posts sections
- Loading branch information
Showing
14 changed files
with
165 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#[1.3.0](https://github.com/guilhermeborgesbastos/live-resume/releases/tag/v1.3) (2021-07-29) | ||
###📃 release notes | ||
- Add horizontal gestures to navigate the profile experience. | ||
- Add horizontal gestures to navigate the profile posts. | ||
|
||
#[1.2.0](https://github.com/guilhermeborgesbastos/live-resume/releases/tag/v1.2) (2020-06-15) | ||
###📃 release notes | ||
- Add to the header an icon for downloading the resume as PDF file; | ||
- Add the company logo to the Experience section; | ||
- Improv application text's readability. | ||
|
||
#[1.1.0](https://github.com/guilhermeborgesbastos/live-resume/releases/tag/v1.1) (2020-06-07) | ||
###📃 release notes | ||
- Solve `websocket-extensions` dependency vulnerability; | ||
- Improve the README instructions; | ||
- Add Google Analytics integration to the repository using ga-beacon; | ||
- Update the footer section to provide the GitHub fork link; | ||
- Create the initial Wiki documentation; | ||
- Improve the skill icons nomenclature, making it generic; | ||
- Remove deprecated test files ( The new Unit and Integration tests are in development ) ; | ||
- Remove CDN assets from the master branch, allowing offline development. | ||
|
||
#[1.0.0](https://github.com/guilhermeborgesbastos/live-resume/releases/tag/v1.0) (2020-05-22) | ||
###📃 Initial release | ||
- The Angular application is ready for production using ES6. The ES5 release can be found in the es5 branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { SwipeSection } from "./swipe.section"; | ||
|
||
enum Direction { | ||
LEFT, | ||
RIGHT, | ||
NOT_READABLE | ||
} | ||
|
||
export abstract class AbstractSwipeSection implements SwipeSection { | ||
|
||
private horizontalSwipeRatio: number; | ||
|
||
private readonly horizontalStartPoint = 0; | ||
|
||
constructor(horizontalSwipeRatio: number = 40) { | ||
this.horizontalSwipeRatio = horizontalSwipeRatio; | ||
} | ||
|
||
onSwipe(event: any): void { | ||
const direction: Direction = this.getEventSwipeDirection(event); | ||
if(!this.disablePreviousNavigation() && direction === Direction.RIGHT) { | ||
this.onClickPrevious(); | ||
} else if(!this.disableNextNavigation() && direction === Direction.LEFT) { | ||
this.onClickNext(); | ||
} | ||
} | ||
|
||
private getEventSwipeDirection(event: any): Direction | undefined { | ||
if(Math.abs(event.deltaX) > this.horizontalSwipeRatio) { | ||
return event.deltaX > this.horizontalStartPoint ? Direction.RIGHT : Direction.LEFT; | ||
} | ||
return Direction.NOT_READABLE; | ||
} | ||
|
||
abstract disablePreviousNavigation(): boolean; | ||
|
||
abstract disableNextNavigation(): boolean; | ||
|
||
abstract onClickPrevious(): void; | ||
|
||
abstract onClickNext(): void; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export declare interface SwipeSection { | ||
|
||
onSwipe(event: any): void; | ||
|
||
disablePreviousNavigation(): boolean; | ||
|
||
disableNextNavigation(): boolean; | ||
|
||
onClickPrevious(): void; | ||
|
||
onClickNext(): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.