mirror of
https://github.com/skishore/makemeahanzi.git
synced 2025-11-01 12:07:15 +08:00
Extend stages API to allow for custom UI
This commit is contained in:
@ -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'}],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user