OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'dart:html'; | 5 import 'dart:html'; |
6 import 'dart:math' as Math; | 6 import 'dart:math' as Math; |
7 | 7 |
8 class Color { | 8 class Color { |
9 int hue; | 9 int hue; |
10 double saturation; | 10 double saturation; |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 d="m 273.04948,79.876866 c 0.072,0.02 0.148,0.044 0.22,0.064 l -0.004,-0.02
c -0.076,-0.02 -0.144,-0.024 -0.216,-0.044 z m 38.66001,20.576004 c -8.792,-8.8
60004 -24.37601,-16.912004 -38.44001,-20.512004 l 67.62801,191.727994 -21.24,47.
93601 -0.02,0.008 51.928,-16.592 0.1,-142.368 -59.956,-60.2 z" | 168 d="m 273.04948,79.876866 c 0.072,0.02 0.148,0.044 0.22,0.064 l -0.004,-0.02
c -0.076,-0.02 -0.144,-0.024 -0.216,-0.044 z m 38.66001,20.576004 c -8.792,-8.8
60004 -24.37601,-16.912004 -38.44001,-20.512004 l 67.62801,191.727994 -21.24,47.
93601 -0.02,0.008 51.928,-16.592 0.1,-142.368 -59.956,-60.2 z" |
169 id="path2908" | 169 id="path2908" |
170 style="fill: #008bc9" /> | 170 style="fill: #008bc9" /> |
171 <path | 171 <path |
172 d="M 263.78548,53.048866 220.45349,10.028873 c -10.02,-9.92799955 -23.664,-
13.0239996 -30.26,-6.8439996 L 77.677489,77.672866 l 174.239991,-0.036 8.64,0.30
8 c 3.9,0.124 8.228,0.832 12.708,1.98 l -9.48,-26.876 z m -186.111991,24.62" | 172 d="M 263.78548,53.048866 220.45349,10.028873 c -10.02,-9.92799955 -23.664,-
13.0239996 -30.26,-6.8439996 L 77.677489,77.672866 l 174.239991,-0.036 8.64,0.30
8 c 3.9,0.124 8.228,0.832 12.708,1.98 l -9.48,-26.876 z m -186.111991,24.62" |
173 id="path2910" | 173 id="path2910" |
174 style="fill: #75ccc3" /> | 174 style="fill: #75ccc3" /> |
175 </svg> | 175 </svg> |
176 """); | 176 """); |
177 | 177 |
178 query("#icon").elements.add(logo); | 178 query("#icon").children.add(logo); |
179 logo.queryAll("path").forEach((p) { | 179 logo.queryAll("path").forEach((p) { |
180 defaultColors[p.id] = new Color.hex(p.style.getPropertyValue('fill')); | 180 defaultColors[p.id] = new Color.hex(p.style.getPropertyValue('fill')); |
181 }); | 181 }); |
182 | 182 |
183 hue = document.query("input[name=hue]"); | 183 hue = document.query("input[name=hue]"); |
184 hue.on.change.add(onSliderChange); | 184 hue.on.change.add(onSliderChange); |
185 saturation = document.query("input[name=saturation]"); | 185 saturation = document.query("input[name=saturation]"); |
186 saturation.on.change.add(onSliderChange); | 186 saturation.on.change.add(onSliderChange); |
187 lightness = document.query("input[name=lightness]"); | 187 lightness = document.query("input[name=lightness]"); |
188 lightness.on.change.add(onSliderChange); | 188 lightness.on.change.add(onSliderChange); |
189 | 189 |
190 document.query("input[name=invert]").on.change.add((Event e) { | 190 document.query("input[name=invert]").on.change.add((Event e) { |
191 InputElement invert = e.target; | 191 InputElement invert = e.target; |
192 if (invert.checked) { | 192 if (invert.checked) { |
193 logo.classes = ['inverse']; | 193 logo.classes = ['inverse']; |
194 } else { | 194 } else { |
195 logo.classes = []; | 195 logo.classes = []; |
196 } | 196 } |
197 }); | 197 }); |
198 } | 198 } |
OLD | NEW |