Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: sky/examples/color/color-picker.sky

Issue 987443002: Remove some more Sky examples that don't run (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sky/examples/color/color-picker-demo.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!--
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
4 // found in the LICENSE file.
5 -->
6 <sky>
7 <import src="/sky/framework/sky-box.sky"/>
8 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
9 <import src="color-wheel.sky" />
10 <import src="color-samples.sky" />
11
12 <sky-element name="color-picker" on-color-change="updateColorSamples">
13 <template>
14 <style>
15 color-samples {
16 height: 80px;
17 margin-top: 10px;
18 }
19 </style>
20 <sky-box title='Choose a Color'>
21 <color-wheel id="color-wheel-element" color="{{ inputColor }}"/>
22 <color-samples id="color-samples-element"/>
23 </sky-box>
24 </template>
25 <script>
26 module.exports = class extends SkyElement {
27 created() {
28 this.inputColor = "#FFFFFF";
29 this.colorSamplesElt = null;
30 // Show the 6 most recently selected colors
31 var colorSample = {cssColor: this.inputColor};
32 this.colorSamples = new Array(6);
33 this.colorSamples.fill({cssColor: this.inputColor});
34 }
35 shadowRootReady() {
36 this.colorSamplesElt = this.shadowRoot.getElementById('color-samples-element ');
37 }
38 updateColorSamples(e) {
39 this.colorSamples.push({cssColor: e.detail});
40 this.colorSamples.shift();
41 this.colorSamplesElt.colors = this.colorSamples;
42 }
43 }.register();
44 </script>
45 </sky-element>
46 </sky>
OLDNEW
« no previous file with comments | « no previous file | sky/examples/color/color-picker-demo.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698