diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index 30aa626c..00000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/extended_image.iml b/.idea/extended_image.iml
deleted file mode 100644
index c9d208a4..00000000
--- a/.idea/extended_image.iml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml
deleted file mode 100644
index e187acc4..00000000
--- a/.idea/libraries/Dart_Packages.xml
+++ /dev/null
@@ -1,458 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml
deleted file mode 100644
index 5b0bb5b3..00000000
--- a/.idea/libraries/Dart_SDK.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml
deleted file mode 100644
index 166c9cb7..00000000
--- a/.idea/libraries/Flutter_Plugins.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/markdown-navigator.xml b/.idea/markdown-navigator.xml
deleted file mode 100644
index d51909ce..00000000
--- a/.idea/markdown-navigator.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/markdown-navigator/profiles_settings.xml b/.idea/markdown-navigator/profiles_settings.xml
deleted file mode 100644
index 57927c5a..00000000
--- a/.idea/markdown-navigator/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 32684726..00000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 7d1209e8..00000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 35eb1ddf..00000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index 2ad3b295..00000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,340 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1567844999849
-
-
- 1567844999849
-
-
- 1567846111172
-
-
-
- 1567846111172
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 63a8bd4e..6c272c74 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## [0.6.1]
+
+* Issues:
+ Fix issue about drag slowly in ImageEditor
+
## [0.6.0]
* Issues:
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index 9b2b9052..78268e52 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -25,8 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 27
-
+ compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
@@ -35,7 +34,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.zmtzawqlp.example"
minSdkVersion 16
- targetSdkVersion 27
+ targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
diff --git a/example/android/gradle.properties b/example/android/gradle.properties
index 8bd86f68..7be3d8b4 100644
--- a/example/android/gradle.properties
+++ b/example/android/gradle.properties
@@ -1 +1,2 @@
org.gradle.jvmargs=-Xmx1536M
+android.enableR8=true
diff --git a/example/lib/example_route_helper.dart b/example/lib/example_route_helper.dart
index adb20f81..754d4ae2 100644
--- a/example/lib/example_route_helper.dart
+++ b/example/lib/example_route_helper.dart
@@ -1,7 +1,7 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// **************************************************************************
// auto generated by https://github.com/fluttercandies/ff_annotation_route
-// **************************************************************************
+// **************************************************************************
import 'package:flutter/widgets.dart';
@@ -13,7 +13,7 @@ class FFNavigatorObserver extends NavigatorObserver {
@override
void didPop(Route route, Route previousRoute) {
- super.didPop(route, previousRoute);
+ super.didPop(route, previousRoute);
_showStatusBarChange(previousRoute, route);
_routeChange(previousRoute);
}
@@ -27,14 +27,14 @@ class FFNavigatorObserver extends NavigatorObserver {
@override
void didRemove(Route route, Route previousRoute) {
- super.didRemove(route, previousRoute);
+ super.didRemove(route, previousRoute);
_showStatusBarChange(previousRoute, route);
- _routeChange(previousRoute);
+ _routeChange(previousRoute);
}
@override
void didReplace({Route newRoute, Route oldRoute}) {
- super.didReplace(newRoute: newRoute, oldRoute: oldRoute);
+ super.didReplace(newRoute: newRoute, oldRoute: oldRoute);
_showStatusBarChange(newRoute, oldRoute);
_routeChange(newRoute);
}
@@ -117,7 +117,6 @@ Widget _defaultTransitionsBuilder(
return child;
}
-
class FFRouteSettings extends RouteSettings {
final String routeName;
final bool showStatusBar;
diff --git a/lib/src/editor/extended_image_editor.dart b/lib/src/editor/extended_image_editor.dart
index 3dfe613e..abf8bcc9 100644
--- a/lib/src/editor/extended_image_editor.dart
+++ b/lib/src/editor/extended_image_editor.dart
@@ -194,6 +194,7 @@ class ExtendedImageEditorState extends State {
var delta = (details.focalPoint - _startingOffset);
var scaleDelta = totalScale / _editActionDetails.preTotalScale;
_startingOffset = details.focalPoint;
+
//no more zoom
if (details.scale != 1.0 &&
(
@@ -210,7 +211,10 @@ class ExtendedImageEditorState extends State {
if (mounted && (scaleDelta != 1.0 || delta != Offset.zero)) {
setState(() {
_editActionDetails.totalScale = totalScale;
- _editActionDetails.delta = delta;
+
+ ///if we have shift offset, we should clear delta.
+ ///we should += delta in case miss delta
+ _editActionDetails.delta += delta;
});
}
}
diff --git a/lib/src/editor/extended_image_editor_utils.dart b/lib/src/editor/extended_image_editor_utils.dart
index a6e89e17..2af693df 100644
--- a/lib/src/editor/extended_image_editor_utils.dart
+++ b/lib/src/editor/extended_image_editor_utils.dart
@@ -197,12 +197,15 @@ class EditActionDetails {
_screenDestinationRect.width * scaleDelta,
_screenDestinationRect.height * scaleDelta);
preTotalScale = totalScale;
+ delta = Offset.zero;
}
/// move
else {
- if (_screenDestinationRect != screenCropRect)
+ if (_screenDestinationRect != screenCropRect) {
_screenDestinationRect = _screenDestinationRect.shift(delta);
+ }
+ //we have shift offset, we should clear delta.
delta = Offset.zero;
}
diff --git a/pubspec.yaml b/pubspec.yaml
index d2d8bac8..a128b2ae 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: extended_image
description: Official extension image, support placeholder(loading)/ failed state, cache network, zoom/pan, photo view, slide out page, editor(crop,rotate,flip), painting etc.
-version: 0.6.0
+version: 0.6.1
author: zmtzawqlp
homepage: https://github.com/fluttercandies/extended_image