@vertigis/viewer-spec 58.9.0 → 58.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +4 -4
- package/README.md +3 -3
- package/docs/Geocortex Apps.md +311 -311
- package/docs/layout-spec.md +731 -731
- package/docs/presentation.md +105 -105
- package/layout/schema/layout-common.xsd +1240 -1240
- package/layout/schema/layout-mobile.xsd +263 -263
- package/layout/schema/layout-web.xsd +431 -431
- package/layout/schema/schema-reference-example.xml +15 -15
- package/messaging/schema/common-action.schema.json +5 -5
- package/messaging/schema/mobile-action.schema.json +6 -6
- package/messaging/schema/web-action.schema.json +17 -17
- package/package.json +82 -82
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/docs/presentation.md
CHANGED
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
# Presentation
|
|
2
|
-
|
|
3
|
-
This document describes the syntax and semantics for presentation attributes:
|
|
4
|
-
|
|
5
|
-
- Margin
|
|
6
|
-
- Padding
|
|
7
|
-
- Width
|
|
8
|
-
- Height
|
|
9
|
-
- Grow
|
|
10
|
-
- Horizontal alignment
|
|
11
|
-
- Vertical alignment
|
|
12
|
-
|
|
13
|
-
## Applicability
|
|
14
|
-
|
|
15
|
-
All attributes apply to all components unless otherwise stated.
|
|
16
|
-
|
|
17
|
-
## Units
|
|
18
|
-
|
|
19
|
-
All dimensional units are expressed in 'em's, unless specified otherwise, where 1 em is equal to the current font size.
|
|
20
|
-
|
|
21
|
-
## Margin
|
|
22
|
-
|
|
23
|
-
**Attribute name**: "margin".
|
|
24
|
-
**Expected value**: Either 0 or a positive number (integer or floating point).
|
|
25
|
-
**Description**: Sets the size of the white space outside of the component.
|
|
26
|
-
|
|
27
|
-
**Example**:
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
<map margin="1.5"/> <!-- Sets the margin on a map to be equal to 1.5x the current font size -->
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Padding
|
|
34
|
-
|
|
35
|
-
**Attribute name**: "padding".
|
|
36
|
-
**Expected value**: Either 0 or a positive number (integer or floating point).
|
|
37
|
-
**Description**: Sets the size of the white space between a component and its content.
|
|
38
|
-
**Applies to**: In VertiGIS Studio Mobile, this attribute will only apply to components with children, due to technical restrictions.
|
|
39
|
-
|
|
40
|
-
**Example**:
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
<stack padding="0.5"/> <!-- Sets the padding on a stack to be equal to 0.5x the current font size -->
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Width and Height
|
|
47
|
-
|
|
48
|
-
**Attribute name**: "width".
|
|
49
|
-
**Expected value**: Em units: Either 0 or a positive number (integer or floating point). Example: 12.
|
|
50
|
-
|
|
51
|
-
**Default value**: If a width is not set, then the width shall be the natural width of the component (however much space it needs).
|
|
52
|
-
**Description**: Sets the width of a component. If em units, then the width is a literal value.
|
|
53
|
-
|
|
54
|
-
**Attribute name**: "height".
|
|
55
|
-
**Expected value**: Em units: Either 0 or a positive number (integer or floating point). Example: 12.
|
|
56
|
-
|
|
57
|
-
**Description**: Sets the height of a component. If em units, then the height is a literal value.
|
|
58
|
-
|
|
59
|
-
**Example**:
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
<!-- Sets the width of a map to 30em, and the height to 20em. -->
|
|
63
|
-
<map width="30em" height="20"/>
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Grow
|
|
67
|
-
|
|
68
|
-
**Attribute name**: "grow".
|
|
69
|
-
**Expected value**: Either 0 or a positive number (integer or floating point).
|
|
70
|
-
**Description**: Sets whether or not a component's width or height will grow over its parents primary axis. Components with a grow of 0 will fill to their natural or requested height. Components with a specified grow will fill up a percentage of the remaining space equal to their grow value divided by the total grow of all sibling components (including the component in question).
|
|
71
|
-
The default value for a component varies by component. For most components, if no grow value is specified, they will default to a grow value of "0". The following components however will have a default grow value of "1":
|
|
72
|
-
|
|
73
|
-
- Map
|
|
74
|
-
- Stack
|
|
75
|
-
- Split
|
|
76
|
-
|
|
77
|
-
**Applies to**: All components may specify this value, but it will only take effect if the component is a child of a split or a stack. For stacks, grow indicates how the child grows along the vertical axis. For splits, grow indicates how the child grows along the horizontal axis.
|
|
78
|
-
|
|
79
|
-
**Example**:
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
<stack>
|
|
83
|
-
<!-- Heading will take up whatever vertical space it requires, and will occupy its natural width. -->
|
|
84
|
-
<text content="Heading"/>
|
|
85
|
-
<!-- The first map will occupy 1/3 of the remaining vertical space, and will occupy the full width available. -->
|
|
86
|
-
<map grow="1"/>
|
|
87
|
-
<!-- The first map will occupy 2/3 of the remaining vertical space, and will occupy the full width available. -->
|
|
88
|
-
<map grow="2"/>
|
|
89
|
-
</stack>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Alignment
|
|
93
|
-
|
|
94
|
-
**Attribute name**: "halign".
|
|
95
|
-
**Expected value**: One of: "start", "center", or "end"
|
|
96
|
-
**Description**: Describes how the content of a component is aligned. For stacks and splits, the content is the child components. For a component like text, the content is the text itself.
|
|
97
|
-
|
|
98
|
-
**Attribute name**: "valign".
|
|
99
|
-
**Expected value**: One of: "start", "center", or "end"
|
|
100
|
-
**Description**: Describes how the content of a component is aligned. For stacks and splits, the content is the child components. For a component like text, the content is the text itself.
|
|
101
|
-
|
|
102
|
-
### Effect on cross-axis stretching
|
|
103
|
-
|
|
104
|
-
All components will stretch across the cross-axis if the corresponding alignment attribute (halign for stacks, valign for splits) is not set on the parent of that componet. But if a cross-axis alignment is set, then they will no longer stretch across the cross axis (otherwise the effect of alignment would not be observed).
|
|
105
|
-
Some components will stretch across the cross-axis even if the cross-axis alignment is set on the parent: map, stack, split.
|
|
1
|
+
# Presentation
|
|
2
|
+
|
|
3
|
+
This document describes the syntax and semantics for presentation attributes:
|
|
4
|
+
|
|
5
|
+
- Margin
|
|
6
|
+
- Padding
|
|
7
|
+
- Width
|
|
8
|
+
- Height
|
|
9
|
+
- Grow
|
|
10
|
+
- Horizontal alignment
|
|
11
|
+
- Vertical alignment
|
|
12
|
+
|
|
13
|
+
## Applicability
|
|
14
|
+
|
|
15
|
+
All attributes apply to all components unless otherwise stated.
|
|
16
|
+
|
|
17
|
+
## Units
|
|
18
|
+
|
|
19
|
+
All dimensional units are expressed in 'em's, unless specified otherwise, where 1 em is equal to the current font size.
|
|
20
|
+
|
|
21
|
+
## Margin
|
|
22
|
+
|
|
23
|
+
**Attribute name**: "margin".
|
|
24
|
+
**Expected value**: Either 0 or a positive number (integer or floating point).
|
|
25
|
+
**Description**: Sets the size of the white space outside of the component.
|
|
26
|
+
|
|
27
|
+
**Example**:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
<map margin="1.5"/> <!-- Sets the margin on a map to be equal to 1.5x the current font size -->
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Padding
|
|
34
|
+
|
|
35
|
+
**Attribute name**: "padding".
|
|
36
|
+
**Expected value**: Either 0 or a positive number (integer or floating point).
|
|
37
|
+
**Description**: Sets the size of the white space between a component and its content.
|
|
38
|
+
**Applies to**: In VertiGIS Studio Mobile, this attribute will only apply to components with children, due to technical restrictions.
|
|
39
|
+
|
|
40
|
+
**Example**:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
<stack padding="0.5"/> <!-- Sets the padding on a stack to be equal to 0.5x the current font size -->
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Width and Height
|
|
47
|
+
|
|
48
|
+
**Attribute name**: "width".
|
|
49
|
+
**Expected value**: Em units: Either 0 or a positive number (integer or floating point). Example: 12.
|
|
50
|
+
|
|
51
|
+
**Default value**: If a width is not set, then the width shall be the natural width of the component (however much space it needs).
|
|
52
|
+
**Description**: Sets the width of a component. If em units, then the width is a literal value.
|
|
53
|
+
|
|
54
|
+
**Attribute name**: "height".
|
|
55
|
+
**Expected value**: Em units: Either 0 or a positive number (integer or floating point). Example: 12.
|
|
56
|
+
|
|
57
|
+
**Description**: Sets the height of a component. If em units, then the height is a literal value.
|
|
58
|
+
|
|
59
|
+
**Example**:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
<!-- Sets the width of a map to 30em, and the height to 20em. -->
|
|
63
|
+
<map width="30em" height="20"/>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Grow
|
|
67
|
+
|
|
68
|
+
**Attribute name**: "grow".
|
|
69
|
+
**Expected value**: Either 0 or a positive number (integer or floating point).
|
|
70
|
+
**Description**: Sets whether or not a component's width or height will grow over its parents primary axis. Components with a grow of 0 will fill to their natural or requested height. Components with a specified grow will fill up a percentage of the remaining space equal to their grow value divided by the total grow of all sibling components (including the component in question).
|
|
71
|
+
The default value for a component varies by component. For most components, if no grow value is specified, they will default to a grow value of "0". The following components however will have a default grow value of "1":
|
|
72
|
+
|
|
73
|
+
- Map
|
|
74
|
+
- Stack
|
|
75
|
+
- Split
|
|
76
|
+
|
|
77
|
+
**Applies to**: All components may specify this value, but it will only take effect if the component is a child of a split or a stack. For stacks, grow indicates how the child grows along the vertical axis. For splits, grow indicates how the child grows along the horizontal axis.
|
|
78
|
+
|
|
79
|
+
**Example**:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
<stack>
|
|
83
|
+
<!-- Heading will take up whatever vertical space it requires, and will occupy its natural width. -->
|
|
84
|
+
<text content="Heading"/>
|
|
85
|
+
<!-- The first map will occupy 1/3 of the remaining vertical space, and will occupy the full width available. -->
|
|
86
|
+
<map grow="1"/>
|
|
87
|
+
<!-- The first map will occupy 2/3 of the remaining vertical space, and will occupy the full width available. -->
|
|
88
|
+
<map grow="2"/>
|
|
89
|
+
</stack>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Alignment
|
|
93
|
+
|
|
94
|
+
**Attribute name**: "halign".
|
|
95
|
+
**Expected value**: One of: "start", "center", or "end"
|
|
96
|
+
**Description**: Describes how the content of a component is aligned. For stacks and splits, the content is the child components. For a component like text, the content is the text itself.
|
|
97
|
+
|
|
98
|
+
**Attribute name**: "valign".
|
|
99
|
+
**Expected value**: One of: "start", "center", or "end"
|
|
100
|
+
**Description**: Describes how the content of a component is aligned. For stacks and splits, the content is the child components. For a component like text, the content is the text itself.
|
|
101
|
+
|
|
102
|
+
### Effect on cross-axis stretching
|
|
103
|
+
|
|
104
|
+
All components will stretch across the cross-axis if the corresponding alignment attribute (halign for stacks, valign for splits) is not set on the parent of that componet. But if a cross-axis alignment is set, then they will no longer stretch across the cross axis (otherwise the effect of alignment would not be observed).
|
|
105
|
+
Some components will stretch across the cross-axis even if the cross-axis alignment is set on the parent: map, stack, split.
|