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

Refactor/clone #54

Merged
merged 19 commits into from
Mar 16, 2019
Merged

Refactor/clone #54

merged 19 commits into from
Mar 16, 2019

Conversation

ismail9k
Copy link
Contributor

This PR is refactoring Hooper and slide components, to handle slides clone better, and enhance performance, with no breaking changes.

Summary

The cloning process is done in the created life cycle hook, by clone each slide vNode object, then pass it to the slots array. here
Each slide now can internally update its width/height and state, based on the current active slide.

Motivation

The old way was including access DOM a lot, each Hooper slider created, and when Hooper is updated.
Clondninig DOM nodes using cloneNode() will only clone the node markup and will not save its event listeners (#49)
This old way forced us to update slide state (active/prev/next) using classList, and its width/height style which is not efficient.

closes #49

@ismail9k ismail9k requested a review from logaretm March 16, 2019 07:27
@ismail9k ismail9k merged commit 5fd709f into master Mar 16, 2019
@ismail9k ismail9k deleted the refactor/clone branch May 12, 2019 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infinite Scroll loses click handlers
2 participants