Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjlockwood committed Jun 20, 2017
1 parent 41180ff commit d73a64e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/app/scripts/export/AvdSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import {
Animation,
AnimationBlock,
PathAnimationBlock,
} from 'app/scripts/model/timeline';
import * as _ from 'lodash';

Expand Down Expand Up @@ -84,8 +85,15 @@ export function toAnimatedVectorDrawableXmlString(vl: VectorLayer, animation: An
blockNode.setAttributeNS(ANDROID_NS, 'android:propertyName', block.propertyName);
conditionalAttr_(blockNode, 'android:startOffset', block.startTime, 0);
conditionalAttr_(blockNode, 'android:duration', block.endTime - block.startTime);
conditionalAttr_(blockNode, 'android:valueFrom', block.fromValue);
conditionalAttr_(blockNode, 'android:valueTo', block.toValue);
if (block instanceof PathAnimationBlock) {
const fromPath = block.fromValue;
const toPath = block.toValue;
conditionalAttr_(blockNode, 'android:valueFrom', fromPath ? fromPath.getPathString() : '');
conditionalAttr_(blockNode, 'android:valueTo', toPath ? toPath.getPathString() : '');
} else {
conditionalAttr_(blockNode, 'android:valueFrom', block.fromValue);
conditionalAttr_(blockNode, 'android:valueTo', block.toValue);
}
conditionalAttr_(
blockNode,
'android:valueType',
Expand Down

0 comments on commit d73a64e

Please sign in to comment.