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

Commit

Permalink
[WEEX][Weex-Core] Fix CSS Transition Not Works Bug And Adapter For Ra…
Browse files Browse the repository at this point in the history
…x Wrong Duration Unit (#2217)

This is a typically misused behaviour of transition property, supporting it is only for backwards compatibility.
  • Loading branch information
gubaojian authored and YorkShen committed Mar 15, 2019
1 parent f95db5a commit bb0913c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,14 @@ private static long parseTimeMillis(Map<String, Object> style, String key, long
if(duration != null){
duration = duration.replaceAll("ms", "");
}
if(duration != null){
if(WXEnvironment.isApkDebugable()){
if(duration.contains("px")){
WXLogUtils.w("Transition Duration Unit Only Support ms, " + duration + " is not ms Unit");
}
}
duration = duration.replaceAll("px", "");
}
if(TextUtils.isEmpty(duration)){
return defaultValue;
}
Expand Down
2 changes: 1 addition & 1 deletion weex_core/Source/android/bridge/platform/android_side.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ int AndroidSide::HasTransitionPros(
if (env == nullptr)
return -1;

if (style == nullptr) {
if (style != nullptr) {
return wx_bridge_->HasTransitionPros(env, page_id, ref, *style);
} else {
return wx_bridge_->HasTransitionPros(
Expand Down

0 comments on commit bb0913c

Please sign in to comment.