Bri Prebilic Cole | 91425fb | 2015-03-11 16:29:48 -0700 | [diff] [blame^] | 1 | <!DOCTYPE html> |
| 2 | <!-- |
| 3 | ~ Copyright 2015 Open Networking Laboratory |
| 4 | ~ |
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | ~ you may not use this file except in compliance with the License. |
| 7 | ~ You may obtain a copy of the License at |
| 8 | ~ |
| 9 | ~ http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | ~ |
| 11 | ~ Unless required by applicable law or agreed to in writing, software |
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | ~ See the License for the specific language governing permissions and |
| 15 | ~ limitations under the License. |
| 16 | --> |
| 17 | |
| 18 | <!-- |
| 19 | ONOS -- SVG mouse over d3 exercise html |
| 20 | --> |
| 21 | |
| 22 | <html> |
| 23 | <head lang="en"> |
| 24 | <meta charset="UTF-8"> |
| 25 | <title>Upgrade Performance</title> |
| 26 | |
| 27 | <script type="text/javascript" src="../tp/angular.js"></script> |
| 28 | <script type="text/javascript" src="../tp/d3.js"></script> |
| 29 | <script type="text/javascript" src="svg-exercise.js"></script> |
| 30 | <script type="text/javascript" src="../app/fw/util/util.js"></script> |
| 31 | <script type="text/javascript" src="../app/fw/util/fn.js"></script> |
| 32 | |
| 33 | |
| 34 | <style> |
| 35 | html, |
| 36 | body { |
| 37 | background-color: #eee; |
| 38 | font-family: Arial, Helvetica, sans-serif; |
| 39 | font-size: 9pt; |
| 40 | } |
| 41 | .button { |
| 42 | fill: #369; |
| 43 | /* TODO: figure out why svg filters are not working */ |
| 44 | /*filter: url(#innerbevel);*/ |
| 45 | } |
| 46 | svg text { |
| 47 | fill: white; |
| 48 | letter-spacing: .005em; |
| 49 | } |
| 50 | defs { |
| 51 | display: none; |
| 52 | } |
| 53 | </style> |
| 54 | </head> |
| 55 | |
| 56 | <body ng-app="svgExercise"> |
| 57 | <div id="svgExDiv" ng-controller="svgExCtrl as ctrl"> |
| 58 | <improve-performance></improve-performance> |
| 59 | </div> |
| 60 | |
| 61 | <svg> |
| 62 | <defs> |
| 63 | <filter id="innerbevel" x0="-50%" y0="-50%" width="200%" height="200%"> |
| 64 | <feGaussianBlur in="SourceAlpha" stdDeviation="2" result="blur"/> |
| 65 | <feOffset dy="-1" dx="-1"/> |
| 66 | <feComposite in2="SourceAlpha" operator="arithmetic" |
| 67 | k2="-1" k3="1" result="hlDiff"/> |
| 68 | <feFlood flood-color="white" flood-opacity=".7"/> |
| 69 | <feComposite in2="hlDiff" operator="in"/> |
| 70 | <feComposite in2="SourceGraphic" operator="over" result="withGlow"/> |
| 71 | |
| 72 | <feOffset in="blur" dy="3" dx="3"/> |
| 73 | <feComposite in2="SourceAlpha" operator="arithmetic" |
| 74 | k2="-1" k3="1" result="shadowDiff"/> |
| 75 | <feFlood flood-color="black" flood-opacity="1"/> |
| 76 | <feComposite in2="shadowDiff" operator="in"/> |
| 77 | <feComposite in2="withGlow" operator="over"/> |
| 78 | </filter> |
| 79 | </defs> |
| 80 | </svg> |
| 81 | |
| 82 | </body> |
| 83 | </html> |