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
* Returns the log message of the last performed operation, for example after having called loadData.
183
+
* Get the log content for the latest operation.
184
+
* @returns The log content as a string
95
185
*/
96
186
getLog: ()=>string;
97
187
98
188
/**
99
-
* Returns the MEI data loaded in the toolkit. If a page number is provided (i.e. > 0), then
100
-
* only that page is exported. In score-based MEI, then only the section element will be
101
-
* output. Set options.scoreBased to true for standard score-based MEI and false for the
102
-
* internal page-based MEI.
189
+
* Get the MEI as a string.
190
+
* @param options A JSON object with the output options; pageNo: integer; (1-based), all pages if none (or 0) specified; scoreBased: true or false; true by default; basic: true or false; false by default; removeIds: true or false; false by default - remove all @xml:id not used in the data;
103
191
*/
104
192
getMEI: (options?: GetMeiOptions)=>string;
105
193
106
194
/**
107
195
* Return MIDI values of the element with the ID (xml:id)
108
196
*
109
197
* RenderToMIDI() must be called prior to using this method
198
+
* @param xmlId the ID (@xml:id) of the element being looked for
* This can be called once the rendering option were changed, for example with a new page (sceen) height or a new zoom level.
291
+
* @param options A JSON object with the action options resetCache: true or false; true by default;
182
292
*/
183
-
redoLayout: ()=>void;
293
+
redoLayout: (options?: RedoLayoutOptions)=>void;
184
294
185
295
/**
186
296
* Redo the layout of the pitch postitions of the current drawing page.
@@ -190,12 +300,20 @@ export class toolkit {
190
300
redoPagePitchPosLayout: ()=>void;
191
301
192
302
/**
193
-
* Loads and the data with the options passed as JSON object and renders the first page. This
194
-
* methods is a shortcut for loadData and then renderPage and is appropriate for rendering small
195
-
* data snippets. The data does stay in memory once loaded. Also, up to version 0.9.12, the JSON
196
-
* object had to be stringified.
303
+
* Render the first page of the data to SVG.
304
+
*
305
+
* This method is a wrapper for setting options, loading data and rendering the first page. It will return an empty string if the options cannot be set or the data cannot be loaded.
306
+
* @param data A string with the data (e.g., MEI data) to be loaded
307
+
* @param options A JSON object with the output options
* Sets the options as JSON for the toolkit instance. Up to version 0.9.12, the JSON object had to be stringified.
348
+
* Reset all options to default values.
227
349
*/
228
-
setOptions: (options: VerovioOptions)=>void;
350
+
resetOptions: ()=>void;
229
351
230
352
/**
231
-
* Return a dictionary of all the options.
353
+
* Reset the seed used to generate MEI @xml:id attribute values.
232
354
*
233
-
* @param defaultValues True for getting the default values and false for the current values
355
+
* Passing 0 will seed the @xml:id generator with a random (time-based) seed value. This method will have no effect if the xml-id-checksum option is set.
356
+
* @param seed The seed value for generating the @xml:id values (0 for a time-based random seed)
* The selection will be applied only when some data is loaded or the layout is redone. The selection can be reset (cancelled) by passing an empty string or an empty JSON object. A selection across multiple mdivs is not possible.
364
+
* @param selection The selection as a stringified object
365
+
* @returns True if the selection was successfully parsed or reset
366
+
*/
367
+
select: (selection: Selection)=>boolean;
368
+
369
+
/**
370
+
* Set option values.
371
+
*
372
+
* The name of each option to be set is to be given as JSON key.
373
+
* @param options A JSON object with the output options
374
+
* @returns True if the options were successfully set
375
+
*/
376
+
setOptions: (options: VerovioOptions)=>boolean;
377
+
378
+
/**
379
+
* Validate the Plaine & Easie code passed in the string data.
380
+
*
381
+
* A single JSON object is returned when there is a global input error. When reading the input succeeds, validation is grouped by input keys. The methods always returns errors in PAE pedantic mode. No data remains loaded after the validation.
382
+
* @param data A string with the data in JSON or with PAE @ keys
383
+
* @returns A JSON object with the validation warnings or errors
0 commit comments