OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
3 <body> | 3 <body> |
4 <script src="../interpolation/resources/interpolation-test.js"></script> | 4 <script src="../interpolation/resources/interpolation-test.js"></script> |
5 <script> | 5 <script> |
6 assertComposition({ | 6 assertComposition({ |
7 property: 'left', | 7 property: 'left', |
8 underlying: '50px', | 8 underlying: '50px', |
9 addFrom: '100px', | 9 addFrom: '100px', |
10 addTo: '200px', | 10 addTo: '200px', |
(...skipping 26 matching lines...) Expand all Loading... |
37 }, [ | 37 }, [ |
38 {at: -0.3, is: 'calc(130px + 4%)'}, | 38 {at: -0.3, is: 'calc(130px + 4%)'}, |
39 {at: 0, is: 'calc(100px + 10%)'}, | 39 {at: 0, is: 'calc(100px + 10%)'}, |
40 {at: 0.5, is: 'calc(50px + 20%)'}, | 40 {at: 0.5, is: 'calc(50px + 20%)'}, |
41 {at: 1, is: '30%'}, | 41 {at: 1, is: '30%'}, |
42 {at: 1.5, is: 'calc(-50px + 40%)'}, | 42 {at: 1.5, is: 'calc(-50px + 40%)'}, |
43 ]); | 43 ]); |
44 | 44 |
45 assertComposition({ | 45 assertComposition({ |
46 property: 'left', | 46 property: 'left', |
| 47 underlying: '10%', |
| 48 addFrom: '100px', |
| 49 addTo: '-10%', |
| 50 }, [ |
| 51 {at: -0.3, is: 'calc(130px + 13%)'}, |
| 52 {at: 0, is: 'calc(100px + 10%)'}, |
| 53 {at: 0.5, is: 'calc(50px + 5%)'}, |
| 54 {at: 1, is: '0%'}, |
| 55 {at: 1.5, is: 'calc(-50px - 5%)'}, |
| 56 ]); |
| 57 |
| 58 assertComposition({ |
| 59 property: 'left', |
47 underlying: '50px', | 60 underlying: '50px', |
48 addFrom: '100px', | 61 addFrom: '100px', |
49 replaceTo: '200px', | 62 replaceTo: '200px', |
50 }, [ | 63 }, [ |
51 {at: -0.3, is: '135px'}, | 64 {at: -0.3, is: '135px'}, |
52 {at: 0, is: '150px'}, | 65 {at: 0, is: '150px'}, |
53 {at: 0.5, is: '175px'}, | 66 {at: 0.5, is: '175px'}, |
54 {at: 1, is: '200px'}, | 67 {at: 1, is: '200px'}, |
55 {at: 1.5, is: '225px'}, | 68 {at: 1.5, is: '225px'}, |
56 ]); | 69 ]); |
57 | 70 |
58 assertComposition({ | 71 assertComposition({ |
59 property: 'left', | 72 property: 'left', |
60 underlying: '100px', | 73 underlying: '100px', |
61 addFrom: '100px', | 74 addFrom: '100px', |
62 addTo: 'auto', | 75 addTo: 'auto', |
63 }, [ | 76 }, [ |
64 {at: -0.3, is: '200px'}, | 77 {at: -0.3, is: '200px'}, |
65 {at: 0, is: '200px'}, | 78 {at: 0, is: '200px'}, |
66 {at: 0.5, is: 'auto'}, | 79 {at: 0.5, is: 'auto'}, |
67 {at: 1, is: 'auto'}, | 80 {at: 1, is: 'auto'}, |
68 {at: 1.5, is: 'auto'}, | 81 {at: 1.5, is: 'auto'}, |
69 ]); | 82 ]); |
70 </script> | 83 </script> |
71 </body> | 84 </body> |
OLD | NEW |