Skip to content

Commit

Permalink
Fixing Pinch to Zoom and Double Tap to Zoom in Vito
Browse files Browse the repository at this point in the history
Reviewed By: defHLT

Differential Revision: D54861699

fbshipit-source-id: b9e1036157a7d817e98da0949fc7d085396f3458
  • Loading branch information
Kartavya Ramnani authored and facebook-github-bot committed Mar 15, 2024
1 parent 85b5e75 commit ba69654
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ class KFrescoVitoDrawable(
_intrinsicHeight = height
}

override fun configureWhenUnderlyingChanged() {
actualImageLayer.configure()
}

override fun getIntrinsicWidth(): Int {
return if (_intrinsicWidth !== -1) {
_intrinsicWidth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,4 +431,10 @@ public int getIntrinsicHeight() {
public ControllerListener2<ImageInfo> getImagePerfControllerListener() {
return mImageListener.getImagePerfControllerListener();
}

@Override
public void configureWhenUnderlyingChanged() {
// This function is not needed in this flow because it is already handled in
// ScaleTypeDrawable.java
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,10 @@ interface FrescoDrawableInterface {
fun getImagePerfControllerListener(): ControllerListener2<ImageInfo>?

fun setIntrinsicSize(width: Int, height: Int)

/**
* Configure the image, bounds, scale and reset the render command. Call it only when you are sure
* that underlying image has changed.
*/
fun configureWhenUnderlyingChanged()
}

0 comments on commit ba69654

Please sign in to comment.