Extend stages API to allow for custom UI

This commit is contained in:
Shaunak Kishore
2015-10-01 02:15:47 -04:00
parent 858c0bf411
commit d58e65787c
8 changed files with 50 additions and 25 deletions

View File

@ -2,13 +2,16 @@
stages.path = class PathStage extends stages.AbstractStage {
constructor(glyph) {
super();
Session.set('stage.type', 'path');
Session.set('stage.instructions',
'Choose a source for glyph path data for this character:');
super('path');
}
refresh(glyph) {
const d = glyph.stages.path;
Session.set('stage.paths', [{d: d, fill: 'gray', stroke: 'gray'}]);
Session.set('stage.status',
d ? [] : [{cls: 'error', message: 'No path data.'}]);
}
}
Template.path_stage.helpers({
options: () => [{label: 'gkai'}, {label: 'UKaiCN'}],
});