kopia lustrzana https://github.com/backface/turtlestitch
fixed #1277
rodzic
2692f1d4e5
commit
23c8ad2208
|
@ -149,7 +149,7 @@ isSnapObject, copy, PushButtonMorph, SpriteIconMorph*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.blocks = '2016-July-05';
|
||||
modules.blocks = '2016-July-06';
|
||||
|
||||
var SyntaxElementMorph;
|
||||
var BlockMorph;
|
||||
|
@ -3735,6 +3735,9 @@ CommandBlockMorph.prototype.allAttachTargets = function (newParent) {
|
|||
answer = [],
|
||||
topBlocks;
|
||||
|
||||
if (this instanceof HatBlockMorph && newParent.rejectsHats) {
|
||||
return answer;
|
||||
}
|
||||
topBlocks = target.children.filter(function (child) {
|
||||
return (child !== myself) &&
|
||||
child instanceof SyntaxElementMorph &&
|
||||
|
@ -5208,6 +5211,7 @@ ScriptsMorph.prototype.init = function (owner) {
|
|||
this.owner = owner || null;
|
||||
this.feedbackColor = SyntaxElementMorph.prototype.feedbackColor;
|
||||
this.feedbackMorph = new BoxMorph();
|
||||
this.rejectsHats = false;
|
||||
|
||||
// "undrop" attributes:
|
||||
this.lastDroppedBlock = null;
|
||||
|
@ -5739,6 +5743,9 @@ ScriptsMorph.prototype.fixMultiArgs = function () {
|
|||
|
||||
ScriptsMorph.prototype.wantsDropOf = function (aMorph) {
|
||||
// override the inherited method
|
||||
if (aMorph instanceof HatBlockMorph) {
|
||||
return !this.rejectsHats;
|
||||
}
|
||||
return aMorph instanceof SyntaxElementMorph ||
|
||||
aMorph instanceof CommentMorph;
|
||||
};
|
||||
|
|
3
byob.js
3
byob.js
|
@ -108,7 +108,7 @@ WatcherMorph, Variable*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.byob = '2016-July-04';
|
||||
modules.byob = '2016-July-06';
|
||||
|
||||
// Declarations
|
||||
|
||||
|
@ -1775,6 +1775,7 @@ BlockEditorMorph.prototype.init = function (definition, target) {
|
|||
|
||||
// create scripting area
|
||||
scripts = new ScriptsMorph(target);
|
||||
scripts.rejectsHats = true;
|
||||
scripts.isDraggable = false;
|
||||
scripts.color = IDE_Morph.prototype.groupColor;
|
||||
scripts.cachedTexture = IDE_Morph.prototype.scriptsPaneTexture;
|
||||
|
|
Ładowanie…
Reference in New Issue