You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: v1-draft-0/specification/docs/Specification.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ The manifest file is a JSON file containing metadata about the Graphic. It consi
66
66
| customActions | Action[]||| An array of `Action` objects. They correspond to the custom actions that can be invoked on the Graphic. See below for details about the fields inside an `Action`. |
67
67
| supportsRealTime | boolean | X || Indicates whether the Graphic supports real-time rendering. |
68
68
| supportsNonRealTime | boolean | X || Indicates whether the Graphic supports non-real-time rendering. If true, the Graphic MUST implement the non-real-time functions `goToTime()` and `setActionsSchedule()`. |
69
-
| schema | object ||| The JSON schema definition for the parameter of the `updateAction()`function. This schema can be seen as the (public) state model of the Graphic. |
69
+
| schema | object ||| The JSON schema definition for the `data` argument to the `load()` and `updateAction()`methods. This schema can be seen as the (public) state model of the Graphic. |
70
70
| stepCount | integer || 1 | The number of steps a Graphic consists of. |
71
71
| renderRequirements | RenderRequirement[]||| A list of requirements that this Graphic has for the rendering environment. At least one of the requirements must be met for the graphic to be expected to work. |
72
72
@@ -185,7 +185,9 @@ In [Typescript interface](#typescript-interface-for-graphic), the full interface
185
185
186
186
187
187
Every Graphic MUST implement the following functions:
188
-
*`load: ({}) => Promise<ReturnPayload>`: Called by the Renderer when the Graphic has been loaded into the DOM.
188
+
*`load: ({ data:any }) => Promise<ReturnPayload>`: Called by the Renderer when the Graphic has been loaded into the DOM.
189
+
The `data`-payload MUST contain the initial internal state of the Graphic.
190
+
The schema of the `data`-payload of this function is described in the Manifest using the `schema` field.
189
191
A Promise is returned that resolves when everything is loaded by the Graphic.
190
192
*`dispose: ({}) => Promise<ReturnPayload>`: Called by the Renderer to force the Graphic to terminate/dispose/clear any loaded resources. A Promise
191
193
is returned that resolves when the Graphic completed the necessary cleanup.
@@ -198,7 +200,7 @@ Every Graphic MUST implement the following functions:
198
200
*`stopAction: ({skipAnimation: boolean}) => Promise<ReturnPayload>`: Called by the Renderer to stop the Graphic from being displayed.
199
201
This can be with or without animation, depending on the value of the `skipAnimation` field. The returned Promise resolves to an `ReturnPayload` object.
200
202
*`updateAction: ({ data: any }) => Promise<ReturnPayload>`: Called by the Renderer to update one or more fields of the internal state of the Graphic. The schema of the
201
-
payload of this function is described in the Manifest using the `schema` field. The returned Promise resolves to an `ReturnPayload` object.
203
+
`data`-payload of this function is described in the Manifest using the `schema` field. The returned Promise resolves to an `ReturnPayload` object.
202
204
*`customAction: ({ id: string, payload: any}) => Promise<ReturnPayload>`: Called by the Renderer to invoke a custom action on the Graphic.
203
205
The `id` field MUST correspond to an `id` of an Action that is defined in the Manifest file, inside the `actions` field.
204
206
The schema for the `payload` field is the described in the corresponding Action inside the Manifest file. A Promise
@@ -271,7 +273,7 @@ The above manifest refers to the Javascript file `lower-third.mjs`, which is the
0 commit comments