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

enhance viewport detection performance #31

Merged
merged 1 commit into from
Jul 21, 2015

Conversation

kaesonho
Copy link
Contributor

  1. previously on page init, we detect viewport for all components, which might hurt the performance on page-init, change the implement here. For page init case, we recursively check viewport from the root, and break as long as the node is not in the viewport.
  2. support props.followLink so that we can integrate with fluxible-router better

@redonkulus @lingyan

@kaesonho kaesonho force-pushed the enhanceInitViewportDetection branch 4 times, most recently from e5bd825 to 588fe78 Compare July 20, 2015 04:04
@redonkulus
Copy link
Contributor

👍

@yahoocla
Copy link

CLA is valid!

@@ -55,6 +55,7 @@ module.exports = function clickHandler (e) {
var isRedirectLink = isDefaultRedirectLink(target);
var isPreventDefault = true;
var props = self.props;
var followLink = props.followLink || props.follow;
Copy link
Member

Choose a reason for hiding this comment

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

Need to check whether props.followLink exists, before falling back to props.follow. i.e. if props.followLink is false, should just return false, instead of checking props.follow again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated :)

@kaesonho kaesonho force-pushed the enhanceInitViewportDetection branch from 06be3dd to 588fe78 Compare July 20, 2015 22:34
@kaesonho
Copy link
Contributor Author

Hi @lingyan I updated, if there's no other concern I will merge this and release a new pkg today :)

@lingyan
Copy link
Member

lingyan commented Jul 21, 2015

Go ahead 🚢, since @redonkulus has reviewed other changes :)

@kaesonho kaesonho force-pushed the enhanceInitViewportDetection branch from 813b7e7 to ca85c80 Compare July 21, 2015 23:23
kaesonho added a commit that referenced this pull request Jul 21, 2015
enhance viewport detection performance
@kaesonho kaesonho merged commit e8363c6 into master Jul 21, 2015
@kaesonho kaesonho deleted the enhanceInitViewportDetection branch July 21, 2015 23:23
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.

4 participants