Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1902 from lucky-chen/ios-feature-interaction_fixd…
Browse files Browse the repository at this point in the history
…element

* [iOS]ignore fixed element for interactionTime
  • Loading branch information
wqyfavor authored Dec 12, 2018
2 parents f745b79 + db5340e commit 0a823bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions ios/sdk/WeexSDK/Sources/Model/WXComponent.mm
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ - (BOOL)_insertSubcomponent:(WXComponent *)subcomponent atIndex:(NSInteger)index
pthread_mutex_unlock(&_propertyMutex);

if (subcomponent->_positionType == WXPositionTypeFixed) {
subcomponent.ignoreInteraction = YES;
[self.weexInstance.componentManager addFixedComponent:subcomponent];
}

Expand Down
5 changes: 1 addition & 4 deletions ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ - (void) recordComponentCreatePerformance:(double) diffTime forComponent:(WXComp
/** on UI thread **/
- (void)onViewLoad:(WXComponent *)targetComponent
{
if (targetComponent.hasAdd) {
if (targetComponent.hasAdd || targetComponent.ignoreInteraction) {
return;
}
targetComponent.hasAdd = true;
Expand All @@ -71,9 +71,6 @@ - (void) _handleRenderTime:(WXComponent*)targetComponent withModifyTime:(double)
if (nil == targetComponent) {
return;
}
if (targetComponent.ignoreInteraction) {
return;
}
double diff = modifyTime - self.renderTimeOrigin;
if (diff > 8000) {
return;
Expand Down

0 comments on commit 0a823bd

Please sign in to comment.