flutter-quill icon indicating copy to clipboard operation
flutter-quill copied to clipboard

[Mobile] weird when resizing image.

Open rikai-VuDang opened this issue 3 years ago • 8 comments

My issue is about [Mobile]

When resizing image, position of that image show it weird (see in video) Could you make when resizing, image always vertical middle of screen? We are using 2.8.1 flutter version in stable channel on branch master.

rikai-VuDang avatar Mar 02 '22 06:03 rikai-VuDang

You can call _scrollController.animateTo or controller.moveCursorToPosition Just need to figure out the correct offset

xinyuezhang0402 avatar Mar 03 '22 01:03 xinyuezhang0402

You can call _scrollController.animateTo Just need to figure out the correct offset

_scrollController will scroll all document, I just need change position of target image only.

rikai-VuDang avatar Mar 04 '22 08:03 rikai-VuDang

My issue is about [Mobile]

When resizing image, position of that image show it weird (see in video) Could you make when resizing, image always vertical middle of screen? We are using 2.8.1 flutter version in stable channel on branch master.

+ 1

I am using simply scroll controller without additional methods but problem with resize still exist.

the-thirteenth-fox avatar Mar 31 '22 19:03 the-thirteenth-fox

════════ Exception caught by scheduler library ═════════════════════════════════
Layer OffsetEngineLayer was previously used as oldLayer.
Once a layer is used as oldLayer, it may not be used again. Instead, after calling one of the SceneBuilder.push* methods and passing an oldLayer to it, use the layer returned by the method as oldLayer in subsequent frames.
'dart:ui[/compositing.dart]()':
Failed assertion: line 88 pos 9: '<optimized out>'

════════════════════════════════════════════════════════════════════════════════

I am got this error after resize image Flutter doctor:

[✓] Flutter (Channel stable, 2.10.4, on macOS 12.0.1 21A559 darwin-arm, locale ru-RU)
    • Flutter version 2.10.4 at /opt/homebrew/Caskroom/flutter/2.2.3/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c860cba910 (7 дней назад), 2022-03-25 00:23:12 -0500
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/vladislavponomarev/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio Preview.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio
    • Android Studio at /Applications/Android Studio Preview.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] VS Code (version 1.66.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.36.0

[✓] Connected device (3 available)
    • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64  • Android 11 (API 30) (emulator)
    • macOS (desktop)           • macos         • darwin-arm64   • macOS 12.0.1 21A559 darwin-arm
    • Chrome (web)              • chrome        • web-javascript • Google Chrome 99.0.4844.84

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

the-thirteenth-fox avatar Mar 31 '22 20:03 the-thirteenth-fox

I am working on the fix. Please let me know if you have any info or suggestion.

singerdmx avatar Jul 25 '22 05:07 singerdmx

I need to understand what is being expected. Related code is here:

image

singerdmx avatar Jul 25 '22 05:07 singerdmx

You can leverage _scrollController.animateTo to scroll to your desired position or offset. Currently I have trouble understanding what is desired position being asked. Please enlighten me.

singerdmx avatar Jul 25 '22 05:07 singerdmx

I am using simply scroll controller without additional methods but problem with resize still exist.

I think it is caused by width or height of image because it is taking up space even it is transparent. Not sure it is really something can be improved.

singerdmx avatar Jul 25 '22 18:07 singerdmx

@singerdmx Just a thought: what if we make our editor's image upload feature more like Slack? place them at the top or bottom of the editor. I think it would make things easier for users

jigarfumakiya avatar Apr 03 '23 10:04 jigarfumakiya

Thank you for the report, this issue has been open for a while and since there are no interactions with it, we had to close it

but if you still facing this issue, or other issues or you have any other questions, feel free to contact us anytime you want.

EchoEllet avatar Nov 08 '23 18:11 EchoEllet