1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <!DOCTYPE html>
- <html>
- <!--
- Copyright 2008 The Closure Library Authors. All Rights Reserved.
- Use of this source code is governed by the Apache License, Version 2.0.
- See the COPYING file for details.
- -->
- <!--
- -->
- <head>
- <title>goog.ui.HsvPalette</title>
- <link rel="stylesheet" href="css/demo.css" />
- <link rel="stylesheet" href="../css/hsvpalette.css" />
- <script src="../base.js"></script>
- <script>
- goog.require('goog.dom');
- goog.require('goog.dom.DomHelper');
- goog.require('goog.events');
- goog.require('goog.ui.Component');
- goog.require('goog.ui.HsvPalette');
- goog.require('goog.style');
- </script>
- </head>
- <body>
- <h1>goog.ui.HsvPalette</h1>
- <h3>Normal Size</h3>
- <script>
- var p = new goog.ui.HsvPalette;
- p.render();
- </script>
- <h3>Smaller Size</h3>
- <script>
- var pSmall = new goog.ui.HsvPalette(null, null, 'goog-hsv-palette-sm');
- pSmall.render();
- p.other = pSmall;
- pSmall.other = p;
- var linkColors = function(e) {
- e.target.other.setColor(e.target.getColor());
- };
- goog.events.listen(p, goog.ui.Component.EventType.ACTION, linkColors);
- goog.events.listen(pSmall, goog.ui.Component.EventType.ACTION, linkColors);
- </script>
- </body>
- </html>
|