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

Commit

Permalink
[iOS] add option to ignore element time calculate (#2580)
Browse files Browse the repository at this point in the history
  • Loading branch information
jianhan-he authored and lucky-chen committed Jun 19, 2019
1 parent f95d135 commit d20be41
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 0 additions & 2 deletions ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,6 @@ - (void)createInstance:(NSString *)instanceIdString
sdkInstance.instanceJavaScriptContext.javaScriptContext[@"wxExtFuncInfo"] = funcInfo;
[self callJSMethod:@"createInstance" args:args];
sdkInstance.instanceJavaScriptContext.javaScriptContext[@"wxExtFuncInfo"] = nil;

[WXExceptionUtils commitCriticalExceptionRT:instanceIdString errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_NO_BUNDLE_TYPE] function:@"createInstance" exception:@"Fatal Error : No bundle type in js bundle head, cause white screen or memory leak!!" extParams:nil];

WX_MONITOR_INSTANCE_PERF_END(WXPTJSCreateInstance, [WXSDKManager instanceForID:instanceIdString]);
}
Expand Down
11 changes: 10 additions & 1 deletion ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,17 @@ - (void)addComponent:(NSString*)ref
}
if (supercomponent.ignoreInteraction) {
component.ignoreInteraction = YES;
} else {
if ([[attributes objectForKey:@"ignoreInteraction"] boolValue]) {
component.ignoreInteraction = YES;
} else {
if (component->_positionType == WXPositionTypeFixed) {
component.ignoreInteraction = YES;
} else {
component.ignoreInteraction = NO;
}
}
}
component.ignoreInteraction = [[attributes objectForKey:@"ignoreInteraction"] boolValue];

#ifdef DEBUG
WXLogDebug(@"flexLayout -> _recursivelyAddComponent : super:(%@,%@):[%f,%f] ,child:(%@,%@):[%f,%f],childClass:%@",
Expand Down
1 change: 0 additions & 1 deletion ios/sdk/WeexSDK/Sources/Model/WXComponent.mm
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@ - (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

0 comments on commit d20be41

Please sign in to comment.