| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 var largeArc = sliceAngle > Math.PI ? 1 : 0; | 107 var largeArc = sliceAngle > Math.PI ? 1 : 0; |
| 108 path.setAttribute("d", "M0,0 L" + x1 + "," + y1 + " A1,1,0," + largeArc
+ ",1," + x2 + "," + y2 + " Z"); | 108 path.setAttribute("d", "M0,0 L" + x1 + "," + y1 + " A1,1,0," + largeArc
+ ",1," + x2 + "," + y2 + " Z"); |
| 109 path.setAttribute("fill", color); | 109 path.setAttribute("fill", color); |
| 110 this._slices.push(path); | 110 this._slices.push(path); |
| 111 }, | 111 }, |
| 112 | 112 |
| 113 /** | 113 /** |
| 114 * @param {!Element} parent | 114 * @param {!Element} parent |
| 115 * @param {string} childType | 115 * @param {string} childType |
| 116 * @return {!Element} | 116 * @return {!Element} |
| 117 * @suppressGlobalPropertiesCheck |
| 117 */ | 118 */ |
| 118 _createSVGChild: function(parent, childType) | 119 _createSVGChild: function(parent, childType) |
| 119 { | 120 { |
| 120 var child = document.createElementNS("http://www.w3.org/2000/svg", child
Type); | 121 var child = document.createElementNS("http://www.w3.org/2000/svg", child
Type); |
| 121 parent.appendChild(child); | 122 parent.appendChild(child); |
| 122 return child; | 123 return child; |
| 123 } | 124 } |
| 124 } | 125 } |
| OLD | NEW |