mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Update comments for addCloudVariable and removeCloudVariable.
This commit is contained in:
parent
431e92aa54
commit
b828444ea8
1 changed files with 8 additions and 2 deletions
|
@ -364,13 +364,17 @@ class Runtime extends EventEmitter {
|
|||
|
||||
/**
|
||||
* A function that tracks a new cloud variable in the runtime,
|
||||
* updating the cloud variable limit.
|
||||
* updating the cloud variable limit. Calling this function will
|
||||
* emit a cloud data update event if this is the first cloud variable
|
||||
* being added.
|
||||
* @type {function}
|
||||
*/
|
||||
this.addCloudVariable = this._initializeAddCloudVariable(newCloudDataManager);
|
||||
|
||||
/**
|
||||
* A function which updates the runtime's cloud variable limit
|
||||
* when removing a cloud variable.
|
||||
* when removing a cloud variable and emits a cloud update event
|
||||
* if the last of the cloud variables is being removed.
|
||||
* @type {function}
|
||||
*/
|
||||
this.removeCloudVariable = this._initializeRemoveCloudVariable(newCloudDataManager);
|
||||
|
@ -647,6 +651,7 @@ class Runtime extends EventEmitter {
|
|||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// Helper function for initializing the addCloudVariable function
|
||||
_initializeAddCloudVariable (newCloudDataManager) {
|
||||
// The addCloudVariable function
|
||||
return (() => {
|
||||
|
@ -658,6 +663,7 @@ class Runtime extends EventEmitter {
|
|||
});
|
||||
}
|
||||
|
||||
// Helper function for initializing the removeCloudVariable function
|
||||
_initializeRemoveCloudVariable (newCloudDataManager) {
|
||||
return (() => {
|
||||
const hadCloudVarsBefore = this.hasCloudData();
|
||||
|
|
Loading…
Reference in a new issue