Fix drag/drop.

This commit is contained in:
Marcin Czachursk 2023-02-20 12:23:20 +01:00
parent e5f387a04e
commit e6bb59c389
2 changed files with 4 additions and 4 deletions

View File

@ -979,7 +979,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 15;
CURRENT_PROJECT_VERSION = 16;
DEVELOPMENT_ASSET_PATHS = "\"Vernissage/Preview Content\"";
DEVELOPMENT_TEAM = B2U9FEKYP8;
ENABLE_PREVIEWS = YES;
@ -1016,7 +1016,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 15;
CURRENT_PROJECT_VERSION = 16;
DEVELOPMENT_ASSET_PATHS = "\"Vernissage/Preview Content\"";
DEVELOPMENT_TEAM = B2U9FEKYP8;
ENABLE_PREVIEWS = YES;

View File

@ -108,8 +108,8 @@ struct ImagesViewer: View {
self.currentOffset = CGSize(width: offsetWidth, height: 0)
}
} .onEnded { amount in
self.accumulatedOffset = CGSize(width: amount.translation.width + self.accumulatedOffset.width,
height: amount.translation.height + self.accumulatedOffset.height)
self.accumulatedOffset = CGSize(width: (amount.translation.width / self.finalMagnification) + self.accumulatedOffset.width,
height: (amount.translation.height / self.finalMagnification) + self.accumulatedOffset.height)
// Animations only for small images sizes,
if self.finalMagnification == 1.0 {