new BlockPyCorgis(main)
Module that connects to the CORGIS datasets and manages interactions
with them. This includes loading in datasets at launch and on-the-fly.
Note that this has no presence on screen, so it does not have a tag.
This:
Parameters:
Name | Type | Description |
---|---|---|
main |
Object | The main BlockPy instance |
Methods
importDataset(slug, name) → {Array.<Deferred>}
Loads the definitions for a dataset into the environment, including
the dataset (as a JS file), the skulpt bindings, and the blockly
bindings. This requires access to a CORGIS server, and occurs
asynchronously. The requests are fired and their deferred objects
are returned - callers can use this information to perform an action
on completion of the import.
Parameters:
Name | Type | Description |
---|---|---|
slug |
String | The URL safe version of the dataset name |
name |
String | The user-friendly version of the dataset name. |
Returns:
- Returns the async requests as deferred objects.
- Type
- Array.<Deferred>
openDialog(name)
Opens a dialog box to present the user with the datasets available
through the CORGIS server. This requires a call, so this method
completes asynchronously. The dialog is composed of a table with
buttons to load the datasets (More than one dataset can be loaded
from within the dialog at a time).
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the dataset to open. This is basically the user friendly version of the name, though it will be mangled into a slug. |