File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -490,6 +490,7 @@ export class Img extends ImageBase {
490490 [ roundTopLeftRadiusProperty . setNative ] ( ) {
491491 this . updateHierarchy ( ) ;
492492 }
493+ @needUpdateHierarchy
493494 [ imageRotationProperty . setNative ] ( value ) {
494495 const scaleType = this . nativeImageViewProtected . getHierarchy ( ) . getActualImageScaleType ( ) ;
495496 scaleType [ 'setImageRotation' ] ?.( value ) ;
@@ -829,6 +830,9 @@ export class Img extends ImageBase {
829830 }
830831
831832 this . nativeImageViewProtected . setHierarchy ( builder . build ( ) ) ;
833+ if ( ! this . _needRequestImage ) {
834+ this . nativeImageViewProtected . setController ( this . nativeImageViewProtected . getController ( ) ) ;
835+ }
832836 }
833837 }
834838
@@ -942,12 +946,12 @@ class GenericDraweeHierarchyBuilder {
942946 return this ;
943947 }
944948
945- public setActualImageScaleType ( scaleType : ScaleType , imageRotation ) : GenericDraweeHierarchyBuilder {
949+ public setActualImageScaleType ( scaleType : ScaleType , imageRotation = 0 ) : GenericDraweeHierarchyBuilder {
946950 if ( ! this . nativeBuilder ) {
947951 return this ;
948952 }
949953 const nativeScaleType = getScaleType ( scaleType ) ;
950- if ( nativeScaleType [ 'setImageRotation' ] ) {
954+ if ( imageRotation !== 0 && nativeScaleType [ 'setImageRotation' ] ) {
951955 nativeScaleType [ 'setImageRotation' ] ( imageRotation ) ;
952956 }
953957 this . nativeBuilder . setActualImageScaleType ( nativeScaleType ) ;
You can’t perform that action at this time.
0 commit comments