| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<!-- |
| 4 |
Copyright 2008 The Closure Library Authors. All Rights Reserved. |
| 5 |
|
| 6 |
Use of this source code is governed by the Apache License, Version 2.0. |
| 7 |
See the COPYING file for details. |
| 8 |
--> |
| 9 |
<!-- |
| 10 |
--> |
| 11 |
<head> |
| 12 |
<title>goog.ui.HsvaPalette</title> |
| 13 |
<link rel="stylesheet" href="css/demo.css" /> |
| 14 |
<link rel="stylesheet" href="../css/hsvapalette.css" /> |
| 15 |
<script src="../base.js"></script> |
| 16 |
<script> |
| 17 |
goog.require('goog.events'); |
| 18 |
goog.require('goog.ui.Component.EventType'); |
| 19 |
goog.require('goog.ui.HsvaPalette'); |
| 20 |
</script> |
| 21 |
</head> |
| 22 |
<body> |
| 23 |
|
| 24 |
<h1>goog.ui.HsvaPalette</h1> |
| 25 |
|
| 26 |
<h3>Normal Size</h3> |
| 27 |
|
| 28 |
<script> |
| 29 |
|
| 30 |
var p = new goog.ui.HsvaPalette; |
| 31 |
p.render(); |
| 32 |
|
| 33 |
</script> |
| 34 |
|
| 35 |
<h3>Smaller Size</h3> |
| 36 |
|
| 37 |
<script> |
| 38 |
|
| 39 |
function linkColors(e) { |
| 40 |
e.target.other.setColorRgbaHex(e.target.getColorRgbaHex()); |
| 41 |
}; |
| 42 |
|
| 43 |
var pSmall = new goog.ui.HsvaPalette(null, null, null, |
| 44 |
'goog-hsva-palette-sm'); |
| 45 |
pSmall.render(); |
| 46 |
|
| 47 |
p.other = pSmall; |
| 48 |
pSmall.other = p; |
| 49 |
goog.events.listen(p, goog.ui.Component.EventType.ACTION, linkColors); |
| 50 |
goog.events.listen(pSmall, goog.ui.Component.EventType.ACTION, linkColors); |
| 51 |
|
| 52 |
</script> |
| 53 |
|
| 54 |
</body> |
| 55 |
</html> |