OLD | NEW |
| (Empty) |
1 <!-- | |
2 Copyright 2012 Google Inc. All Rights Reserved. | |
3 | |
4 Licensed under the Apache License, Version 2.0 (the "License"); | |
5 you may not use this file except in compliance with the License. | |
6 You may obtain a copy of the License at | |
7 | |
8 http://www.apache.org/licenses/LICENSE-2.0 | |
9 | |
10 Unless required by applicable law or agreed to in writing, software | |
11 distributed under the License is distributed on an "AS IS" BASIS, | |
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 See the License for the specific language governing permissions and | |
14 limitations under the License. | |
15 --> | |
16 | |
17 <!DOCTYPE html><meta charset="UTF-8"> | |
18 <style> | |
19 .anim { | |
20 fill: lightsteelblue; | |
21 } | |
22 .expectation { | |
23 fill: red; | |
24 } | |
25 </style> | |
26 <svg width='800px' height='800px'> | |
27 <rect class="expectation" x="400px" y="200px" width="50px" height="100px"> | |
28 </rect> | |
29 <rect class="anim" x="100px" y="10px" width="100px" height="100px"> | |
30 </rect> | |
31 </svg> | |
32 <script src="../bootstrap.js"></script> | |
33 <script> | |
34 "use strict"; | |
35 var rect = document.querySelector(".anim"); | |
36 | |
37 document.timeline.play(new Animation(rect, [ | |
38 {y: "300px", width: "100px"}, | |
39 {width: "20px"}, | |
40 {x: "400px", y: "200px", width: "50px"}, | |
41 ], {duration: 1 * 1000, fill: 'forwards'})); | |
42 | |
43 </script> | |
OLD | NEW |