Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Unified Diff: sky/sdk/lib/framework/widgets/wrappers.dart

Issue 1182743002: Animate checkboxes (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/lib/framework/widgets/checkbox.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/widgets/wrappers.dart
diff --git a/sky/sdk/lib/framework/widgets/wrappers.dart b/sky/sdk/lib/framework/widgets/wrappers.dart
index 63620544a541f3050569194de48552dc7dc53a9b..676afa65fa7df476274abc0af3a567744b9f51f9 100644
--- a/sky/sdk/lib/framework/widgets/wrappers.dart
+++ b/sky/sdk/lib/framework/widgets/wrappers.dart
@@ -49,19 +49,21 @@ class DecoratedBox extends OneChildRenderObjectWrapper {
}
-// TODO(jackson) need a mechanism for marking the RenderCustomPaint as needing paint
class CustomPaint extends OneChildRenderObjectWrapper {
- CustomPaint({ this.callback, UINode child, Object key })
+ CustomPaint({ this.callback, this.token, UINode child, Object key })
: super(child: child, key: key);
RenderCustomPaint get root { RenderCustomPaint result = super.root; return result; }
final CustomPaintCallback callback;
+ final dynamic token; // set this to be repainted automatically when the token changes
RenderCustomPaint createNode() => new RenderCustomPaint(callback: callback);
void syncRenderObject(CustomPaint old) {
super.syncRenderObject(old);
+ if (old != null && old.token != token)
+ root.markNeedsPaint();
root.callback = callback;
}
« no previous file with comments | « sky/sdk/lib/framework/widgets/checkbox.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698