-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40671 from code-dot-org/dtl_candidate_15be1d8e
- Loading branch information
Showing
236 changed files
with
2,632 additions
and
1,706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
export default function initializeCdoConstants(blocklyWrapper) { | ||
blocklyWrapper.Procedures.DEFINITION_BLOCK_TYPES = [ | ||
'procedures_defnoreturn', | ||
'procedures_defreturn', | ||
'functional_definition' | ||
]; | ||
|
||
blocklyWrapper.BlockValueType = { | ||
NONE: 'None', // Typically as a connection/input check means "accepts any type" | ||
STRING: 'String', | ||
NUMBER: 'Number', | ||
IMAGE: 'Image', | ||
BOOLEAN: 'Boolean', | ||
FUNCTION: 'Function', | ||
COLOUR: 'Colour', | ||
ARRAY: 'Array', | ||
|
||
// p5.play Sprite | ||
SPRITE: 'Sprite', | ||
|
||
/** | ||
* {Object} Behavior | ||
* {function} Behavior.func | ||
* {Array} Behavior.extraArgs | ||
*/ | ||
BEHAVIOR: 'Behavior', | ||
|
||
/** | ||
* {Object} Location | ||
* {number} Location.x | ||
* {number} Location.y | ||
*/ | ||
LOCATION: 'Location' | ||
}; | ||
|
||
// Google Blockly defaults to 28, but Cdo Blockly defaults to 15. Some labs set the snap radius | ||
// by multiplying a scale factor, so it's important that the default value matches what it was on our fork | ||
blocklyWrapper.SNAP_RADIUS = 15; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default function initializeVariables(blocklyWrapper) { | ||
// TODO - required for sprite variable blocks | ||
blocklyWrapper.Variables.registerGetter = function(category, blockName) {}; | ||
|
||
// TODO - required for all variable blocks | ||
blocklyWrapper.Variables.getVars = function(opt_category) { | ||
return {}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// This class is not yet implemented. It is used for the modal function editor, | ||
// which is used by Sprite Lab and Artist. | ||
export default class FunctionEditor { | ||
// TODO | ||
constructor( | ||
opt_msgOverrides, | ||
opt_definitionBlockType, | ||
opt_parameterBlockTypes, | ||
opt_disableParamEditing, | ||
opt_paramTypes | ||
) {} | ||
|
||
// TODO | ||
isOpen() { | ||
return false; | ||
} | ||
|
||
// TODO | ||
renameParameter(oldName, newName) {} | ||
|
||
// TODO | ||
refreshParamsEverywhere() {} | ||
|
||
// TODO | ||
openEditorForFunction(procedureBlock, functionName) {} | ||
|
||
// TODO | ||
openWithNewFunction() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.