Skip to content

Commit

Permalink
feat: Modify the node reset registration
Browse files Browse the repository at this point in the history
feat: Modify the node reset registration
  • Loading branch information
drawcall committed Jan 14, 2024
1 parent 6fde44b commit f70f4cf
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 2.7.2
- Modify the node reset registration point to 0.5.

# 2.7.1
- Add zkapp panStart panUpdate panEnd events.

Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ description: A new Flutter project.
version: 1.0.0+1

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.12.0 <4.0.0"

dependencies:
flutter:
sdk: flutter

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
cupertino_icons: ^1.0.6
zerker:
path: ../

Expand Down
6 changes: 6 additions & 0 deletions lib/src/extras/scrollbg.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ class ZKScrollBg extends ZKContainer {
this.forEach((bgFrag) => bgFrag.debug = d);
}

@override
void reset() {
super.reset();
this.anchor.reset();
}

@override
void dispose() {
super.dispose();
Expand Down
6 changes: 6 additions & 0 deletions lib/src/node/graphic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ class ZKGraphic extends ZKNode {
}
}

@override
void reset() {
super.reset();
this.anchor.reset();
}

@override
void dispose() {
super.dispose();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/node/node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class ZKNode {

void reset() {
this.position.reset();
this.anchor.reset();
this.anchor.set(0.5, 0.5);
this.scale.reset();
this.skew.reset();
this.rotation = 0;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: Zerker is a flexible and lightweight flutter canvas graphic animati
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 2.7.1
version: 2.7.2
homepage: https://github.com/flutterkit/zerker

environment:
Expand Down

0 comments on commit f70f4cf

Please sign in to comment.