kopia lustrzana https://github.com/backface/turtlestitch
fixed some minor variable-renaming issues
rodzic
ff5a930c86
commit
98f4c5c50f
|
@ -41,6 +41,7 @@
|
|||
* fixed outdated blocks specs for "When I am ..." hat block in many translations
|
||||
* fixed duplicating custom block definitions that don't have a body
|
||||
* allow selecting the fill color in the vector editor via touch-hold gesture on touch devices
|
||||
* fixed some minor variable-renaming issues
|
||||
* **Documentation Updates:**
|
||||
* updated manual, thanks Brian!
|
||||
* updated readme, thanks, Michael!
|
||||
|
@ -48,6 +49,9 @@
|
|||
* German
|
||||
* Chinese, thanks, Simon!
|
||||
|
||||
### 2021-11-06
|
||||
* blocks: fixed some minor variable-renaming issues
|
||||
|
||||
### 2021-11-03
|
||||
* sketch: allow selecting the fill color in the vector editor via touch-hold gesture on touch devices
|
||||
* updated version history
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<script src="src/morphic.js?version=2021-07-09"></script>
|
||||
<script src="src/symbols.js?version=2021-03-03"></script>
|
||||
<script src="src/widgets.js?version=2021-10-26"></script>
|
||||
<script src="src/blocks.js?version=2021-10-29"></script>
|
||||
<script src="src/blocks.js?version=2021-11-06"></script>
|
||||
<script src="src/threads.js?version=2021-10-22"></script>
|
||||
<script src="src/objects.js?version=2021-10-29"></script>
|
||||
<script src="src/scenes.js?version=2021-10-12"></script>
|
||||
|
|
|
@ -160,7 +160,7 @@ CustomCommandBlockMorph, ToggleButtonMorph, DialMorph, SnapExtensions*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.blocks = '2021-October-29';
|
||||
modules.blocks = '2021-November-06';
|
||||
|
||||
var SyntaxElementMorph;
|
||||
var BlockMorph;
|
||||
|
@ -3952,7 +3952,14 @@ BlockMorph.prototype.refactorThisVar = function (justTheTemplate) {
|
|||
);
|
||||
|
||||
function renameVarTo (newName) {
|
||||
var block;
|
||||
|
||||
if (this.parent instanceof SyntaxElementMorph) {
|
||||
|
||||
// commented out by jens and reformulated below
|
||||
// in an attempt to catch some bugs in v6:
|
||||
|
||||
/*
|
||||
if (this.parentThatIsA(BlockEditorMorph)) {
|
||||
this.doRefactorBlockParameter(
|
||||
oldName,
|
||||
|
@ -3964,6 +3971,34 @@ BlockMorph.prototype.refactorThisVar = function (justTheTemplate) {
|
|||
} else {
|
||||
this.doRefactorScriptVar(oldName, newName, justTheTemplate);
|
||||
}
|
||||
*/
|
||||
|
||||
// trying to make some things more reliable below,
|
||||
// I guess at one point we'll have to rethink the
|
||||
// whole mechanism (jens)
|
||||
|
||||
if (this.parent instanceof BlockInputFragmentMorph) {
|
||||
this.doRefactorBlockParameter(
|
||||
oldName,
|
||||
newName,
|
||||
justTheTemplate
|
||||
);
|
||||
} else if (this.parent instanceof TemplateSlotMorph) {
|
||||
block = this.parent.parentThatIsA(BlockMorph);
|
||||
if (block instanceof RingMorph) {
|
||||
this.doRefactorRingParameter(
|
||||
oldName,
|
||||
newName,
|
||||
justTheTemplate
|
||||
);
|
||||
} else if (block.selector === 'doDeclareVariables') {
|
||||
this.doRefactorScriptVar(oldName, newName, justTheTemplate);
|
||||
} else {
|
||||
// I guess it could also be an upvar ... (jens)
|
||||
// perhaps we should show an error here?
|
||||
}
|
||||
}
|
||||
|
||||
} else if (receiver.hasSpriteVariable(oldName)) {
|
||||
this.doRefactorSpriteVar(oldName, newName, justTheTemplate);
|
||||
} else {
|
||||
|
|
Ładowanie…
Reference in New Issue