/
WordSpaceSchemas.js
79 lines (67 loc) · 2.68 KB
/
WordSpaceSchemas.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
Copyright 2018 OCAD University
Licensed under the Educational Community License (ECL), Version 2.0 or the New
BSD license. You may not use this file except in compliance with one these
Licenses.
You may obtain a copy of the ECL 2.0 License and BSD License at
https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
*/
var fluid_3_0_0 = fluid_3_0_0 || {};
(function (fluid) {
"use strict";
/*******************************************************************************
* Starter auxiliary schema grade
*
* Contains the settings for the word space preference
*******************************************************************************/
// Fine-tune the starter aux schema and add word space preference
fluid.defaults("fluid.prefs.auxSchema.wordSpace", {
gradeNames: ["fluid.prefs.auxSchema"],
auxiliarySchema: {
"namespace": "fluid.prefs.constructed",
"terms": {
"templatePrefix": "../../framework/preferences/html/",
"messagePrefix": "../../framework/preferences/messages/"
},
"template": "%templatePrefix/SeparatedPanelPrefsEditor.html",
"message": "%messagePrefix/prefsEditor.json",
wordSpace: {
type: "fluid.prefs.wordSpace",
enactor: {
type: "fluid.prefs.enactor.wordSpace",
fontSizeMap: {
"xx-small": "9px",
"x-small": "11px",
"small": "13px",
"medium": "15px",
"large": "18px",
"x-large": "23px",
"xx-large": "30px"
}
},
panel: {
type: "fluid.prefs.panel.wordSpace",
container: ".flc-prefsEditor-word-space",
template: "%templatePrefix/PrefsEditorTemplate-wordSpace.html",
message: "%messagePrefix/wordSpace.json"
}
}
}
});
/*******************************************************************************
* Primary Schema
*******************************************************************************/
// add extra prefs to the starter primary schemas
fluid.defaults("fluid.prefs.schemas.wordSpace", {
gradeNames: ["fluid.prefs.schemas"],
schema: {
"fluid.prefs.wordSpace": {
"type": "number",
"default": 1,
"minimum": 0.7,
"maximum": 2,
"divisibleBy": 0.1
}
}
});
})(fluid_3_0_0);