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

Unified Diff: sky/examples/style/hex-layout.sky

Issue 845053002: Specs and Docs: minor updates to fix mistakes I found when proof-reading (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/examples/style/sky-core-styles.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/style/hex-layout.sky
diff --git a/sky/examples/style/hex-layout.sky b/sky/examples/style/hex-layout.sky
index 3f223c39558c9e441bd0968b727c7adbfcce5145..15982a0af084a62302f3b09d5bdd95bcb4f8b8cb 100644
--- a/sky/examples/style/hex-layout.sky
+++ b/sky/examples/style/hex-layout.sky
@@ -115,8 +115,8 @@
}
}
sky.registerLayoutManager('beehive', BeehiveLayoutManager);
- let BeehiveCountStyleValueType = new StyleValueType();
- BeehiveCountStyleValueType.addParser((tokens) => {
+ let BeehiveCountStyleGrammar = new StyleGrammar();
+ BeehiveCountStyleGrammar.addParser((tokens) => {
let token = tokens.next();
if (token.done)
throw new Error();
@@ -126,13 +126,11 @@
throw new Error();
if (Math.trunc(token.value.value) != token.value.value) // is integer
throw new Error();
- return {
- value: token.value.value;
- }
+ return new NumericStyleValue(token.value.value);
});
sky.registerProperty({
name: 'beehive-count',
- type: BeehiveCountStyleValueType,
+ type: BeehiveCountStyleGrammar,
inherits: true,
initialValue: 5,
needsLayout: true,
« no previous file with comments | « no previous file | sky/examples/style/sky-core-styles.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698