panpf / zoomimage

ZoomImage is an gesture zoom viewing of images library specially designed for Compose Multiplatform and Android View. Supported scale, pan, locate, rotation, and super-large image subsampling.
Apache License 2.0
340 stars 19 forks source link

Unpredictable scrolling when zooming quickly with two fingers. #28

Closed onenoyami closed 3 months ago

onenoyami commented 5 months ago

Hi. Your library is very good! But I ran into a problem when zooming with two fingers, there is a very fast and confusing scrolling. Is there any way to fix it?

Video

panpf commented 5 months ago

Please describe your platform and the components used and their versions in detail

onenoyami commented 5 months ago

Sorry, I should have posted right away. Affected platforms: Android 14

Affected components: GlideAsyncZoomImage

Versions: TargetSDK: 34 JvwTarget: 17 zoomimage-compose-glide:1.0.2 Glide: 5.0.0rc01 Kotlin version:1.9.24 Compose version: compose-bom:2024.06.00, kotlinCompilerExtensionVersion '1.5.14'

Running Devices: Nothing Phone 1 arm64-v8a

Sample code: I just used it without any customizations.

view.zoomState = rememberZoomState()

backRouting.BackListenerLayer({ view.close() }, { isClosing.value }) { backRouting ->
    GlideZoomAsyncImage(
        "${view.mediaItem.uri}",
        null,
        Modifier
                    .wrapContentSize(Alignment.Center, true)
                    .fillMaxSize(),
                    state = view.zoomState!!,
                    contentScale = ContentScale.Fit
        )
}

Edit

The problem as expected is fling. It is rare, but can be strong even at soft zoom. Standard velocity value ~(-1312.8473, -2197.8108), and when it "flies away", velocity is more than 10000.

Log:

19:56:41.626  D  ZoomableState@9df97bfd. transform. centroid=532.36x1264.98, panChange=-4.25x22.74, zoomChange=1.2238, rotationChange=0.0. targetScale=6.3162, targetUserScale=2.8046, addUserScale=0.5129 -> 0.5129, addUserOffset=-294.34x-601.98 -> -294.34x-615.0, userTransform=(2.29x2.29,-759.5x-1549.0,0.0,0.0x0.0,0.0x0.0) -> (2.8x2.8,-1053.84x-2164.0,0.0,0.0x0.0,0.0x0.0)
19:56:41.638  D  ZoomableState@9df97bfd. transform. centroid=528.12x1287.72, panChange=-5.22x7.7, zoomChange=1.1103, rotationChange=0.0. targetScale=7.0128, targetUserScale=3.1139, addUserScale=0.3093 -> 0.3093, addUserOffset=-180.26x-372.13 -> -180.26x-372.13, userTransform=(2.8x2.8,-1053.84x-2164.0,0.0,0.0x0.0,0.0x0.0) -> (3.11x3.11,-1234.1x-2536.13,0.0,0.0x0.0,0.0x0.0)
19:56:41.656  D  ZoomableState@9df97bfd. transform. centroid=522.9x1295.42, panChange=-8.88x-1.96, zoomChange=1.0713, rotationChange=0.0. targetScale=7.5126, targetUserScale=3.3359, addUserScale=0.222 -> 0.222, addUserOffset=-134.75x-275.21 -> -134.75x-275.21, userTransform=(3.11x3.11,-1234.1x-2536.13,0.0,0.0x0.0,0.0x0.0) -> (3.34x3.34,-1368.85x-2811.34,0.0,0.0x0.0,0.0x0.0)
19:56:41.658  D  ZoomableState@9df97bfd. transform. centroid=845.22x1680.3, panChange=3.0x8.0, zoomChange=1.0, rotationChange=0.0. targetScale=7.5126, targetUserScale=3.3359, addUserScale=0.0 -> 0.0, addUserOffset=3.0x8.0 -> 3.0x8.0, userTransform=(3.34x3.34,-1368.85x-2811.34,0.0,0.0x0.0,0.0x0.0) -> (3.34x3.34,-1365.85x-2803.34,0.0,0.0x0.0,0.0x0.0)
19:56:41.660  D  ZoomableState@9df97bfd. transform. centroid=848.21x1688.3, panChange=0.36x1.08, zoomChange=1.0, rotationChange=0.0. targetScale=7.5126, targetUserScale=3.3359, addUserScale=0.0 -> 0.0, addUserOffset=0.36x1.08 -> 0.36x1.08, userTransform=(3.34x3.34,-1365.85x-2803.34,0.0,0.0x0.0,0.0x0.0) -> (3.34x3.34,-1365.49x-2802.26,0.0,0.0x0.0,0.0x0.0)
19:56:41.662  D  ZoomableState@9df97bfd. transform. centroid=848.58x1689.38, panChange=0.64x1.92, zoomChange=1.0, rotationChange=0.0. targetScale=7.5126, targetUserScale=3.3359, addUserScale=0.0 -> 0.0, addUserOffset=0.64x1.92 -> 0.64x1.92, userTransform=(3.34x3.34,-1365.49x-2802.26,0.0,0.0x0.0,0.0x0.0) -> (3.34x3.34,-1364.85x-2800.34,0.0,0.0x0.0,0.0x0.0)
19:56:41.669  D  ZoomableState@9df97bfd. fling. running. velocity=(31416.88, 37075.867) px/sec. startUserOffset=-1364.85x-2800.34, currentUserOffset=-1364.04x-2799.26
19:56:41.678  D  ZoomableState@9df97bfd. fling. running. velocity=(31416.88, 37075.867) px/sec. startUserOffset=-1364.85x-2800.34, currentUserOffset=-579.29x-2649.0
19:56:41.686  D  ZoomableState@9df97bfd. fling. running. velocity=(31416.88, 37075.867) px/sec. startUserOffset=-1364.85x-2800.34, currentUserOffset=-328.21x-2649.0
19:56:41.693  D  ZoomableState@9df97bfd. fling. running. velocity=(31416.88, 37075.867) px/sec. startUserOffset=-1364.85x-2800.34, currentUserOffset=-77.51x-2649.0
19:56:41.701  D  ZoomableState@9df97bfd. fling. running. velocity=(31416.88, 37075.867) px/sec. startUserOffset=-1364.85x-2800.34, currentUserOffset=0.0x-2649.0
iori57 commented 4 months ago

First of all thanks for the library! Been trying to implement my own zoom image in compose but having a hard time trying to get the zooming to work correctly regardless of image dimension. Your library works really well out of the box!

I am able to reproduce the issue when on zoomimage-compose-glide v1.1.0-alpha03

It is more apparent when using a tall image such as 100px width and 900px height

If you slowly let go of the two fingers after zooming in, it works fine. But if you let go right away after using two fingers to zoom in (momentum zoom?), it will scroll all the way to the top of the image.

On Android 14, Samsung Z Fold 5

panpf commented 4 months ago

My current work goal is basic experience and unit testing. Experience optimization may have to wait a little longer. Please understand.

iori57 commented 4 months ago

Understood, thanks for replying so quickly!

This is the only issue that preventing from fully adopting it as the full solution for our app, as it happens quite regularly in normal use after some testing.

Will revisit back in the future for sure!

panpf commented 4 months ago

@iori57 I also used GlideZoomAsyncImage but did not reproduce this problem. Can you record a video? It is better to use another phone to record your operation process instead of recording the screen directly on the phone.

iori57 commented 4 months ago

Hi Thanks for trying to reproduce it. I have switched to use ZoomImage directly instead, to load the painter using GlideSubcomposition (from Glide library), and it has the same issue.

My code is just:

val zoomState = rememberZoomState()
ZoomImage(
    painter = painter, // from GlideSubcomposition after it returns RequestState.Success
    contentDescription = contentDescription,
    modifier = Modifier.fillMaxSize(),
    zoomState = zoomState,
    scrollBar = null,
)

Recording below shows that I'm trying to zoom in to the middle 'Zero Latency' marker on the map, and if we let go the two fingers while the momentum of zoom is still ongoing, it pans to the top right corner. If letting go finger slowly it doesn't have this issue.

https://github.com/user-attachments/assets/2e9237f7-e1b8-4b34-abdd-9497286f2b32

panpf commented 4 months ago

This is actually because ZoomImage supports two-finger dragging. I am trying to disable two-finger dragging and only allow single-finger dragging.

panpf commented 4 months ago

@iori57 This issue has been fixed on the dev branch. You can switch to the dev branch and run the sample code or run the publish_to_local.sh script to publish the library to the local to verify whether it meets your expectations.

iori57 commented 4 months ago

Thanks for the quick fix, ideally if we can fix the fling issue while also having two-finger dragging would be great though.

I wanted to test it but having some issue publishing the library to local. Sorry haven't played with maven before this is new to me.

Initially I got the issue below, and I think I solved it by editing gradle.properties file and setting RELEASE_SIGNING_ENABLED to false

> Task :zoomimage-compose:signAndroidReleasePublication FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':zoomimage-compose:signAndroidReleasePublication'.
> Cannot perform signing task ':zoomimage-compose:signAndroidReleasePublication' because it has no configured signatory

After that, I ran into a second issue which I don't know how to resolve:

bruce@192-168-1-103 zoomimage-dev % ./publish_to_local.sh
Type-safe project accessors is an incubating feature.
Project accessors enabled, but root project name not explicitly set for 'buildSrc'. Checking out the project in different folders will impact the generated code and implicitly the buildscript classpath, breaking caching.

> Configure project :sample
w: New 'wasm' target is Work-in-Progress and is subject to change without notice. Please report encountered issues to https://kotl.in/issue

Configuration 'jsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'jsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'wasmJsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'wasmJsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'jsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'jsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'wasmJsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'jsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'wasmJsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'wasmJsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'jsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'wasmJsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'jsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'jsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'wasmJsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'jsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'wasmJsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'wasmJsNpmAggregated' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.

> Task :zoomimage-compose:compileCommonMainKotlinMetadata FAILED
e: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-compose/src/commonMain/kotlin/com/github/panpf/zoomimage/compose/subsampling/ComposeTileBitmapConvertor.kt:27:8 Class 'ComposeTileBitmapConvertor' is not abstract and does not implement abstract member 'convert'.

> Task :zoomimage-compose:compileReleaseKotlinAndroid
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-compose/src/androidMain/kotlin/com/github/panpf/zoomimage/compose/subsampling/ComposeTileBitmapConvertor.kt:28:1 'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta. You can use -Xexpect-actual-classes flag to suppress this warning. Also see: https://youtrack.jetbrains.com/issue/KT-61573
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-compose/src/commonMain/kotlin/com/github/panpf/zoomimage/compose/subsampling/ComposeTileBitmapConvertor.kt:27:1 'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta. You can use -Xexpect-actual-classes flag to suppress this warning. Also see: https://youtrack.jetbrains.com/issue/KT-61573
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-compose/src/commonMain/kotlin/com/github/panpf/zoomimage/compose/subsampling/SubsamplingState.kt:292:58 This declaration is in a preview state and can be changed in a backwards-incompatible manner with a best-effort migration. Its usage should be marked with '@kotlinx.coroutines.FlowPreview' or '@OptIn(kotlinx.coroutines.FlowPreview::class)' if you accept the drawback of relying on preview API

> Task :zoomimage-compose:compileKotlinDesktop
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-compose/src/commonMain/kotlin/com/github/panpf/zoomimage/compose/subsampling/ComposeTileBitmapConvertor.kt:27:1 'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta. You can use -Xexpect-actual-classes flag to suppress this warning. Also see: https://youtrack.jetbrains.com/issue/KT-61573
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-compose/src/commonMain/kotlin/com/github/panpf/zoomimage/compose/subsampling/SubsamplingState.kt:292:58 This declaration is in a preview state and can be changed in a backwards-incompatible manner with a best-effort migration. Its usage should be marked with '@kotlinx.coroutines.FlowPreview' or '@OptIn(kotlinx.coroutines.FlowPreview::class)' if you accept the drawback of relying on preview API
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-compose/src/nonAndroidMain/kotlin/com/github/panpf/zoomimage/compose/subsampling/ComposeTileBitmapConvertor.kt:28:1 'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta. You can use -Xexpect-actual-classes flag to suppress this warning. Also see: https://youtrack.jetbrains.com/issue/KT-61573

> Task :zoomimage-core:compileKotlinJs
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntOffsetCompat.kt:63:5 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntOffsetCompat.kt:63:5 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntOffsetCompat.kt:69:5 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntOffsetCompat.kt:69:5 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntOffsetCompat.kt:75:5 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntOffsetCompat.kt:75:5 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntOffsetCompat.kt:139:1 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntOffsetCompat.kt:139:1 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntOffsetCompat.kt:156:1 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntOffsetCompat.kt:156:1 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntSizeCompat.kt:53:5 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntSizeCompat.kt:53:5 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntSizeCompat.kt:55:5 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/IntSizeCompat.kt:55:5 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/ScaleFactorCompat.kt:65:5 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/ScaleFactorCompat.kt:65:5 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/ScaleFactorCompat.kt:67:5 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/ScaleFactorCompat.kt:67:5 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/SizeCompat.kt:64:5 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/SizeCompat.kt:64:5 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/SizeCompat.kt:66:5 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/SizeCompat.kt:66:5 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/SizeCompat.kt:174:1 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/SizeCompat.kt:174:1 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/SizeCompat.kt:179:1 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/SizeCompat.kt:179:1 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/SizeCompat.kt:189:1 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/SizeCompat.kt:189:1 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/TransformOriginCompat.kt:60:5 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/TransformOriginCompat.kt:60:5 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/TransformOriginCompat.kt:62:5 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/TransformOriginCompat.kt:62:5 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/internal/InlineClassHelper.kt:26:10 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/internal/InlineClassHelper.kt:26:10 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/internal/InlineClassHelper.kt:35:10 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/internal/InlineClassHelper.kt:35:10 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/internal/InlineClassHelper.kt:42:10 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/internal/InlineClassHelper.kt:42:10 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/internal/InlineClassHelper.kt:49:10 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/internal/InlineClassHelper.kt:49:10 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/internal/InlineClassHelper.kt:56:10 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/internal/InlineClassHelper.kt:56:10 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/internal/InlineClassHelper.kt:63:10 [NOTHING_TO_INLINE] Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/bruce/Downloads/zoomimage-dev/zoomimage-core/src/commonMain/kotlin/com/github/panpf/zoomimage/util/internal/InlineClassHelper.kt:63:10 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':zoomimage-compose:compileCommonMainKotlinMetadata'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 9s
96 actionable tasks: 18 executed, 78 up-to-date
panpf commented 4 months ago

Please update the dev branch code, the two problems you mentioned are fixed

iori57 commented 4 months ago

That's quick! Am able to build it with success and tested working as expected 😁👍

Would be great if we can reintroduce two finger dragging in the future when you have time to fix the fling issue though, but for now it is perfectly usable!

Thanks!

panpf commented 3 months ago

Version 1.1.0-alpha05 has fixed this issue