WebAnimations Meta#713
Conversation
afcaa60 to
59867fb
Compare
agubler
left a comment
There was a problem hiding this comment.
couple of very minor nits and questions
| const { scroll } = this.meta(Dimensions).get('content'); | ||
|
|
||
| return [ | ||
| { height: `0px` }, |
There was a problem hiding this comment.
nit: we don't need ` here, just '
| import Map from '@dojo/shim/Map'; | ||
| import MetaBase from '../meta/Base'; | ||
|
|
||
| declare const KeyframeEffect: any; |
| (node: HNode) => { | ||
| const { animate, key } = node.properties; | ||
| if (animate && key) { | ||
| this.meta(AnimationPlayer).add(key as string, animate, this); |
There was a problem hiding this comment.
any reason we can't bind the controls in here rather than in the meta?
There was a problem hiding this comment.
we can but it's potentially an array of arrays so wanted to avoid the extra loops. Can do though if you feel it's better?
| decorate(result, | ||
| (node: HNode) => { | ||
| const { animate, key } = node.properties; | ||
| if (animate && key) { |
There was a problem hiding this comment.
Do you think we should warn if animate is passed without a key, might be surprising if it doesn't work?
8ffa0b6 to
26ecd13
Compare
|
@agubler ready for another review |
| export interface WidgetMetaProperties { | ||
| invalidate: () => void; | ||
| nodeHandler: NodeHandlerInterface; | ||
| bind: any; |
There was a problem hiding this comment.
the bind scope is any in widgetBase I believe? I guess it should probably be WidgetBaseConstructor ?
There was a problem hiding this comment.
It wouldn't be the constructor, it would just be WidgetBase if it is able to be typed.
| } | ||
|
|
||
| afterRender() { | ||
| super.afterRender(); |
There was a problem hiding this comment.
Is this not how you call the super function?
|
package-lock.json conflict now |
|
@agubler all done, please re-review |
Type: feature
The following has been addressed in the PR:
Description:
Adds a
WebAnimationsmeta which allows programatic web animations to be applied to aVNode.Resolves #657