mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -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,
|
* 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);
|
this.addCloudVariable = this._initializeAddCloudVariable(newCloudDataManager);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A function which updates the runtime's cloud variable limit
|
* 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}
|
* @type {function}
|
||||||
*/
|
*/
|
||||||
this.removeCloudVariable = this._initializeRemoveCloudVariable(newCloudDataManager);
|
this.removeCloudVariable = this._initializeRemoveCloudVariable(newCloudDataManager);
|
||||||
|
@ -647,6 +651,7 @@ class Runtime extends EventEmitter {
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Helper function for initializing the addCloudVariable function
|
||||||
_initializeAddCloudVariable (newCloudDataManager) {
|
_initializeAddCloudVariable (newCloudDataManager) {
|
||||||
// The addCloudVariable function
|
// The addCloudVariable function
|
||||||
return (() => {
|
return (() => {
|
||||||
|
@ -658,6 +663,7 @@ class Runtime extends EventEmitter {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Helper function for initializing the removeCloudVariable function
|
||||||
_initializeRemoveCloudVariable (newCloudDataManager) {
|
_initializeRemoveCloudVariable (newCloudDataManager) {
|
||||||
return (() => {
|
return (() => {
|
||||||
const hadCloudVarsBefore = this.hasCloudData();
|
const hadCloudVarsBefore = this.hasCloudData();
|
||||||
|
|
Loading…
Reference in a new issue