OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <body> |
| 4 <template id="target-template"> |
| 5 <svg width="90" height="90"> |
| 6 <defs> |
| 7 <marker class="target" /> |
| 8 </defs> |
| 9 </svg> |
| 10 </template> |
| 11 <script src="../svg-attribute-interpolation/resources/interpolation-test.js"></s
cript> |
| 12 <script> |
| 13 'use strict'; |
| 14 assertAttributeInterpolation({ |
| 15 property: 'viewBox', |
| 16 underlying: '-10, 10, -10, 10', |
| 17 from: '-10, 20, 80, 90', |
| 18 fromComposite: 'add', |
| 19 to: '-20, 30, 70, 80', |
| 20 toComposite: 'add' |
| 21 }, [ |
| 22 {at: -0.4, is: '-6, 16, 84, 94'}, |
| 23 {at: 0, is: '-10, 20, 80, 90'}, |
| 24 {at: 0.2, is: '-12, 22, 78, 88'}, |
| 25 {at: 0.6, is: '-16, 26, 74, 84'}, |
| 26 {at: 1, is: '-20, 30, 70, 80'}, |
| 27 {at: 1.4, is: '-24, 34, 66, 76'} |
| 28 ]); |
| 29 |
| 30 assertAttributeInterpolation({ |
| 31 property: 'viewBox', |
| 32 underlying: '-10, 10, -10, 10', |
| 33 from: '-10, 20, 80, 90', |
| 34 fromComposite: 'add', |
| 35 to: '-20, 30, 70, 80', |
| 36 toComposite: 'replace' |
| 37 }, [ |
| 38 {at: -0.4, is: '-6, 16, 84, 94'}, |
| 39 {at: 0, is: '-10, 20, 80, 90'}, |
| 40 {at: 0.2, is: '-12, 22, 78, 88'}, |
| 41 {at: 0.6, is: '-16, 26, 74, 84'}, |
| 42 {at: 1, is: '-20, 30, 70, 80'}, |
| 43 {at: 1.4, is: '-24, 34, 66, 76'} |
| 44 ]); |
| 45 |
| 46 assertAttributeInterpolation({ |
| 47 property: 'viewBox', |
| 48 underlying: '-10, 10, -10, 10', |
| 49 from: '-10, 20, 80, 90', |
| 50 fromComposite: 'replace', |
| 51 to: '-20, 30, 70, 80', |
| 52 toComposite: 'add', |
| 53 }, [ |
| 54 {at: -0.4, is: '-6, 16, 84, 94'}, |
| 55 {at: 0, is: '-10, 20, 80, 90'}, |
| 56 {at: 0.2, is: '-12, 22, 78, 88'}, |
| 57 {at: 0.6, is: '-16, 26, 74, 84'}, |
| 58 {at: 1, is: '-20, 30, 70, 80'}, |
| 59 {at: 1.4, is: '-24, 34, 66, 76'} |
| 60 ]); |
| 61 |
| 62 assertAttributeInterpolation({ |
| 63 property: 'viewBox', |
| 64 underlying: '-10, 20, 80, 90', |
| 65 from: '', |
| 66 fromComposite: 'add', |
| 67 to: '-20, 30, 70, 80', |
| 68 toComposite: 'replace' |
| 69 }, [ |
| 70 {at: -0.4, is: '-6, 16, 84, 94'}, |
| 71 {at: 0, is: '-10, 20, 80, 90'}, |
| 72 {at: 0.2, is: '-12, 22, 78, 88'}, |
| 73 {at: 0.6, is: '-16, 26, 74, 84'}, |
| 74 {at: 1, is: '-20, 30, 70, 80'}, |
| 75 {at: 1.4, is: '-24, 34, 66, 76'} |
| 76 ]); |
| 77 |
| 78 </script> |
| 79 </body> |
| 80 </html> |
OLD | NEW |