| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 // Copyright 2015 The Chromium Authors. All rights reserved. | 2 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 <import src="sky-element.sky" /> | 6 <import src="sky-element.sky" /> |
| 7 | 7 |
| 8 <sky-element attributes="type:string, size:number"> | 8 <sky-element attributes="type:string, size:number"> |
| 9 <template> | 9 <template> |
| 10 <img /> | 10 <img /> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 _setSize(size); | 38 _setSize(size); |
| 39 _setSrc(type, size); | 39 _setSrc(type, size); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void typeChanged(String oldValue, String newValue) { | 42 void typeChanged(String oldValue, String newValue) { |
| 43 if (_img != null) | 43 if (_img != null) |
| 44 _setSrc(newValue, size.floor()); | 44 _setSrc(newValue, size.floor()); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void sizeChanged(double oldValue, double newValue) { | 47 void sizeChanged(double oldValue, double newValue) { |
| 48 if (_img != null) | 48 if (_img != null) { |
| 49 _setSize(newValue.floor()); | 49 _setSize(newValue.floor()); |
| 50 _setSrc(type, newValue.floor()); |
| 51 } |
| 50 } | 52 } |
| 51 } | 53 } |
| 52 | 54 |
| 53 _init(script) => register(script, SkyIcon); | 55 _init(script) => register(script, SkyIcon); |
| 54 </script> | 56 </script> |
| 55 </sky-element> | 57 </sky-element> |
| OLD | NEW |