| OLD | NEW |
| 1 var sunflower = dart.defineLibrary(sunflower, {}); | 1 var sunflower = dart.defineLibrary(sunflower, {}); |
| 2 var math = dart.import(math); | 2 var math = dart.import(math); |
| 3 var dom = dart.import(dom); | 3 var dom = dart.import(dom); |
| 4 var core = dart.import(core); | 4 var core = dart.import(core); |
| 5 (function(exports, math, dom, core) { | 5 (function(exports, math, dom, core) { |
| 6 'use strict'; | 6 'use strict'; |
| 7 let ORANGE = "orange"; | 7 let ORANGE = "orange"; |
| 8 let SEED_RADIUS = 2; | 8 let SEED_RADIUS = 2; |
| 9 let SCALE_FACTOR = 4; | 9 let SCALE_FACTOR = 4; |
| 10 let TAU = dart.notNull(math.PI) * 2; | 10 let TAU = dart.notNull(math.PI) * 2; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 exports.context.fillStyle = this.color; | 66 exports.context.fillStyle = this.color; |
| 67 exports.context.strokeStyle = this.color; | 67 exports.context.strokeStyle = this.color; |
| 68 exports.context.arc(this.x, this.y, this.radius, 0, TAU, false); | 68 exports.context.arc(this.x, this.y, this.radius, 0, TAU, false); |
| 69 exports.context.fill(); | 69 exports.context.fill(); |
| 70 exports.context.closePath(); | 70 exports.context.closePath(); |
| 71 exports.context.stroke(); | 71 exports.context.stroke(); |
| 72 } | 72 } |
| 73 } | 73 } |
| 74 CirclePainter[dart.implements] = () => [Circle]; | 74 CirclePainter[dart.implements] = () => [Circle]; |
| 75 dart.setSignature(CirclePainter, { | 75 dart.setSignature(CirclePainter, { |
| 76 methods: () => ({draw: dart.functionType(dart.void, [])}) | 76 methods: () => ({draw: [dart.void, []]}) |
| 77 }); | 77 }); |
| 78 class SunflowerSeed extends dart.mixin(Circle, CirclePainter) { | 78 class SunflowerSeed extends dart.mixin(Circle, CirclePainter) { |
| 79 SunflowerSeed(x, y, radius, color) { | 79 SunflowerSeed(x, y, radius, color) { |
| 80 if (color === void 0) | 80 if (color === void 0) |
| 81 color = null; | 81 color = null; |
| 82 super.Circle(x, y, radius); | 82 super.Circle(x, y, radius); |
| 83 if (color != null) | 83 if (color != null) |
| 84 this.color = color; | 84 this.color = color; |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 dart.setSignature(SunflowerSeed, {}); | 87 dart.setSignature(SunflowerSeed, {}); |
| 88 // Exports: | 88 // Exports: |
| 89 exports.ORANGE = ORANGE; | 89 exports.ORANGE = ORANGE; |
| 90 exports.SEED_RADIUS = SEED_RADIUS; | 90 exports.SEED_RADIUS = SEED_RADIUS; |
| 91 exports.SCALE_FACTOR = SCALE_FACTOR; | 91 exports.SCALE_FACTOR = SCALE_FACTOR; |
| 92 exports.TAU = TAU; | 92 exports.TAU = TAU; |
| 93 exports.MAX_D = MAX_D; | 93 exports.MAX_D = MAX_D; |
| 94 exports.centerX = centerX; | 94 exports.centerX = centerX; |
| 95 exports.centerY = centerY; | 95 exports.centerY = centerY; |
| 96 exports.querySelector = querySelector; | 96 exports.querySelector = querySelector; |
| 97 exports.main = main; | 97 exports.main = main; |
| 98 exports.draw = draw; | 98 exports.draw = draw; |
| 99 exports.Circle = Circle; | 99 exports.Circle = Circle; |
| 100 exports.CirclePainter = CirclePainter; | 100 exports.CirclePainter = CirclePainter; |
| 101 exports.SunflowerSeed = SunflowerSeed; | 101 exports.SunflowerSeed = SunflowerSeed; |
| 102 })(sunflower, math, dom, core); | 102 })(sunflower, math, dom, core); |
| OLD | NEW |