Skip to content

Commit

Permalink
fixes #73
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjlockwood committed Mar 11, 2017
1 parent 7a4e49f commit 7a27f90
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/app/toolbar/toolbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export class ToolbarComponent implements OnInit {
endVectorLayer.height,
endVectorLayer.alpha);
const zip = new JSZip();
zip.file('README.txt', createExportReadme());
const android = zip.folder('android');
const avd = AvdSerializer.vectorLayerAnimationToAvdXmlString(startOutputVectorLayer, avdTargets);
android.file('AnimatedVectorDrawable.xml', avd);
Expand Down Expand Up @@ -283,3 +284,44 @@ function downloadFile(content: Blob, fileName: string) {
anchor.get(0).click();
window.URL.revokeObjectURL(url);
}

function createExportReadme() {
return `=== Files exported by Shape Shifter ===
This archive contains the following:
web/
- StartSvg.svg
- EndSvg.svg
android/
- StartVectorDrawable.xml
- EndVectorDrawable.xml
- AnimatedVectorDrawable.xml
If you have an export format that you'd like to see added, please file
a feature request using the link below!
Further reading:
- Shape Shifter live version:
https://alexjlockwood.github.io/ShapeShifter
- Shape Shifter source code:
https://github.com/alexjlockwood/ShapeShifter
- File a feature request:
https://github.com/alexjlockwood/ShapeShifter/issues
- Introduction to Icon Animations blog post:
http://www.androiddesignpatterns.com/2016/11/introduction-to-icon-animation-techniques.html
- Animated Vector Drawable sample Android application:
https://github.com/alexjlockwood/adp-delightful-details
- VectorDrawable & AnimatedVectorDrawable developer training docs:
https://developer.android.com/guide/topics/graphics/vector-drawable-resources.html
(c) 2017 Alex Lockwood
`;
}

0 comments on commit 7a27f90

Please sign in to comment.