summaryrefslogtreecommitdiff
path: root/blocks.js
diff options
context:
space:
mode:
Diffstat (limited to 'blocks.js')
-rw-r--r--blocks.js30
1 files changed, 27 insertions, 3 deletions
diff --git a/blocks.js b/blocks.js
index 0ce1478..f0ddd93 100644
--- a/blocks.js
+++ b/blocks.js
@@ -155,7 +155,8 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph, Costume*/
// Global stuff ////////////////////////////////////////////////////////
-modules.blocks = '2014-January-09';
+modules.blocks = '2014-March-31';
+
var SyntaxElementMorph;
var BlockMorph;
@@ -812,6 +813,24 @@ SyntaxElementMorph.prototype.labelPart = function (spec) {
true // read-only
);
break;
+ case '%dates':
+ part = new InputSlotMorph(
+ null, // text
+ false, // non-numeric
+ {
+ 'year' : ['year'],
+ 'month' : ['month'],
+ 'date' : ['date'],
+ 'day of week' : ['day of week'],
+ 'hour' : ['hour'],
+ 'minute' : ['minute'],
+ 'second' : ['second'],
+ 'time in milliseconds' : ['time in milliseconds']
+ },
+ true // read-only
+ );
+ part.setContents(['date']);
+ break;
case '%delim':
part = new InputSlotMorph(
null, // text
@@ -1192,7 +1211,6 @@ SyntaxElementMorph.prototype.labelPart = function (spec) {
);
break;
-
// symbols:
case '%turtle':
@@ -1617,6 +1635,12 @@ SyntaxElementMorph.prototype.showBubble = function (value) {
morphToShow.silentSetWidth(img.width);
morphToShow.silentSetHeight(img.height);
morphToShow.image = img;
+ } else if (value instanceof Costume) {
+ img = value.thumbnail(new Point(40, 40));
+ morphToShow = new Morph();
+ morphToShow.silentSetWidth(img.width);
+ morphToShow.silentSetHeight(img.height);
+ morphToShow.image = img;
} else if (value instanceof Context) {
img = value.image();
morphToShow = new Morph();
@@ -6174,7 +6198,7 @@ CSlotMorph.prototype.drawBottomEdge = function (context) {
I am an editable text input slot. I can be either rectangular or
rounded, and can have an optional drop-down menu. If I'm set to
read-only I must have a drop-down menu and will assume a darker
- shade of my parent's color.
+ shade of my parent's color.
my most important public attributes and accessors are: