Skip to content

Commit f70f4cf

Browse files
committed
feat: Modify the node reset registration
feat: Modify the node reset registration
1 parent 6fde44b commit f70f4cf

File tree

6 files changed

+19
-4
lines changed

6 files changed

+19
-4
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 2.7.2
2+
- Modify the node reset registration point to 0.5.
3+
14
# 2.7.1
25
- Add zkapp panStart panUpdate panEnd events.
36

example/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ description: A new Flutter project.
1414
version: 1.0.0+1
1515

1616
environment:
17-
sdk: ">=2.12.0 <3.0.0"
17+
sdk: ">=2.12.0 <4.0.0"
1818

1919
dependencies:
2020
flutter:
2121
sdk: flutter
2222

2323
# The following adds the Cupertino Icons font to your application.
2424
# Use with the CupertinoIcons class for iOS style icons.
25-
cupertino_icons: ^0.1.2
25+
cupertino_icons: ^1.0.6
2626
zerker:
2727
path: ../
2828

lib/src/extras/scrollbg.dart

+6
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ class ZKScrollBg extends ZKContainer {
193193
this.forEach((bgFrag) => bgFrag.debug = d);
194194
}
195195

196+
@override
197+
void reset() {
198+
super.reset();
199+
this.anchor.reset();
200+
}
201+
196202
@override
197203
void dispose() {
198204
super.dispose();

lib/src/node/graphic.dart

+6
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ class ZKGraphic extends ZKNode {
183183
}
184184
}
185185

186+
@override
187+
void reset() {
188+
super.reset();
189+
this.anchor.reset();
190+
}
191+
186192
@override
187193
void dispose() {
188194
super.dispose();

lib/src/node/node.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class ZKNode {
213213

214214
void reset() {
215215
this.position.reset();
216-
this.anchor.reset();
216+
this.anchor.set(0.5, 0.5);
217217
this.scale.reset();
218218
this.skew.reset();
219219
this.rotation = 0;

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: Zerker is a flexible and lightweight flutter canvas graphic animati
1111
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
1212
# Read more about iOS versioning at
1313
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14-
version: 2.7.1
14+
version: 2.7.2
1515
homepage: https://github.com/flutterkit/zerker
1616

1717
environment:

0 commit comments

Comments
 (0)