Skip to content

Commit

Permalink
Center image on moving, closes #185
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Jun 5, 2022
1 parent a82d97c commit ed598ba
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
35 changes: 27 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
# Changelog

<!--ENTER CHANGELOG HERE-->

## 1.3.0 (2022-05-26)

<!--ENTER CHANGELOG HERE-->

## 1.3.1 (2022-06-03)

* Reimplement color field
* Fix bake issues when moving the camera with a gesture
* Fix move gesture relative to viewport
* Fix fill mode
* Fix hard edges in settings dialog
* Fix firefox bug when creating a new path
* Fix undo/redo buttons
* Fix invalid elements after changing the layer
* Fix background dialog slider
* Fix svg export
* Only export elements that are in this bounds
* Fix option to disable background
* Fix offset of eraser mask
* Fix loading of templates in old version
* Add reset button in templates
* Ignore invalid templates

## 1.3.0 (2022-05-26)

* Fix bug where document will be cleared after removing a layer or rename a layer

Read the whole 1.3 changelog at https://go.linwood.dev/butterfly/1-3

## 1.3.0-rc.2 (2022-05-22)

Read the whole 1.3 changelog at https://go.linwood.dev/butterfly/1-3

## 1.3.0-rc.2 (2022-05-22)

* Fix layout on bigger screens
* Fix image export
* Improve position of submenus
Expand Down
2 changes: 1 addition & 1 deletion app/lib/dialogs/insert.dart
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class _InsertDialogState extends State<InsertDialog> {
pages: callback.pages,
dpi: PdfPageFormat.inch * callback.quality)) {
final png = await page.toPng();
final scale = callback.quality;
final scale = 1 / callback.quality;
selectedElements.add(ImageElement(
height: page.height,
width: page.width,
Expand Down
1 change: 1 addition & 0 deletions app/lib/dialogs/pages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class _PagesDialogState extends State<PagesDialog> {
defaultValue: 2,
value: quality,
max: 10,
min: 0.5,
label: AppLocalizations.of(context)!.quality,
),
Padding(
Expand Down
3 changes: 2 additions & 1 deletion app/lib/renderers/elements/image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,6 @@ class ImageRenderer extends Renderer<ImageElement> {
}

@override
ImageElement move(Offset position) => element.copyWith(position: position);
ImageElement move(Offset position) => element.copyWith(
position: position - Offset(rect.width / 2, rect.height / 2));
}
3 changes: 3 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/26.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
* Fix bug when area is not visible when changing the painter
* Improve spacing of selection rect based on the zoom
* Move android storage to external
* Center image on moving ([#185](https://github.com/LinwoodCloud/Butterfly/issues/185))
* Fix image low quality
* Fix missing constraints button in image element dialog
* Fix window_manager errors on mobile devices

1 comment on commit ed598ba

@vercel
Copy link

@vercel vercel bot commented on ed598ba Jun 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.