Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swipe touch - hammerjs replaced with contact-js #446

Closed

Conversation

arumuganainar73
Copy link

  1. Removed hammerjs package from package json
  2. Replaced touch actions with contact js (https://biodiv.github.io/contactjs/)

@@ -153,6 +149,8 @@ export class NguCarousel<T>

private _destroy$ = new Subject<void>();

private _pointerListener: any;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this instance, if its not being used anywhere

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No required, Removed

this._nguCarouselHammerManager.on(hammer, 'panup').subscribe((ev: any) => {
this._touchHandling('panleft', ev);
});
this._pointerListener = new PointerListener(this._touchContainer.nativeElement, options);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to understand if this property is used to hold the reference, should er also unsubscribe to this listener onDestroy

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No required, Removed

@@ -339,89 +336,79 @@ export class NguCarousel<T>
}

ngOnDestroy() {
this._hammer?.destroy();
this._destroy$.next();
}

/** Get Touch input */
private _setupHammer(): void {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we rename this method to _setupHammer -> setupTouch

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@nx-cloud
Copy link

nx-cloud bot commented May 16, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit c28a371. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@santoshyadavdev
Copy link
Member

can you add contactjs here https://github.com/uiuniversal/ngu-carousel/blob/master/libs/ngu/carousel/package.json#L8 and remove hammer, also remove all the reference to hammerjs and replace with contactjs

@arumuganainar73
Copy link
Author

can you add contactjs here https://github.com/uiuniversal/ngu-carousel/blob/master/libs/ngu/carousel/package.json#L8 and remove hammer, also remove all the reference to hammerjs and replace with contactjs

done

@santoshyadavdev
Copy link
Member

can you resolve the conflict please

Copy link

This PR has been automatically marked as stale because it has not had recent activity for 6 months. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label May 24, 2024
Copy link

Closing this PR due to no activity for 6 months.

@github-actions github-actions bot closed this May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants