Skip to content

Commit

Permalink
Merge branch 'main' into remote-download-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 authored Dec 31, 2024
2 parents f4d4d63 + 50c2881 commit 349031f
Show file tree
Hide file tree
Showing 7 changed files with 312 additions and 205 deletions.
11 changes: 10 additions & 1 deletion lib/services/field_images.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,22 @@ class Field {
int? fieldImageWidth;
int? fieldImageHeight;

Size? get fieldImageSize =>
(fieldImageWidth != null && fieldImageHeight != null)
? Size(fieldImageWidth!.toDouble(), fieldImageHeight!.toDouble())
: null;

late double fieldWidthMeters;
late double fieldHeightMeters;

late Offset topLeftCorner;
late Offset bottomRightCorner;

late Offset fieldCenter;
Offset get center => (fieldImageLoaded)
? Offset(bottomRightCorner.dx - topLeftCorner.dx,
bottomRightCorner.dy - topLeftCorner.dy) /
2
: const Offset(0, 0);

late Image fieldImage;

Expand Down
4 changes: 2 additions & 2 deletions lib/services/nt_widget_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ class NTWidgetBuilder {
model: FieldWidgetModel.new,
widget: FieldWidget.new,
fromJson: FieldWidgetModel.fromJson,
minWidth: _normalSize * 3,
minWidth: _normalSize * 2,
minHeight: _normalSize * 2,
defaultWidth: 3,
defaultWidth: 2,
defaultHeight: 2);

register(
Expand Down
Loading

0 comments on commit 349031f

Please sign in to comment.