Skip to content

Commit

Permalink
Clamping trim start/end.
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-rosso committed Oct 4, 2019
1 parent daba34d commit 2c5f420
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions flare_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.5.11] - 2019-10-04 13:44:04

- Clamping trim start/end values to 0-1.

## [1.5.10] - 2019-09-30 21:20:50

- Bump flare_dart dependency.
Expand Down
4 changes: 2 additions & 2 deletions flare_flutter/lib/flare.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ abstract class FlutterStroke {
if (stroke.isTrimmed) {
if (effectPath == null) {
bool isSequential = stroke.trim == TrimPath.Sequential;
double start = stroke.trimStart;
double end = stroke.trimEnd;
double start = stroke.trimStart.clamp(0, 1).toDouble();
double end = stroke.trimEnd.clamp(0, 1).toDouble();
double offset = stroke.trimOffset;
bool inverted = start > end;
if ((start - end).abs() != 1.0) {
Expand Down
2 changes: 1 addition & 1 deletion flare_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flare_flutter
description: Vector design and runtime animation for Flutter.
version: 1.5.10
version: 1.5.11
author: "2Dimensions Team <info@2dimensions.com>"
homepage: https://github.com/2d-inc/Flare-Flutter
environment:
Expand Down

0 comments on commit 2c5f420

Please sign in to comment.