kopia lustrzana https://github.com/backface/turtlestitch
initialize trigger widgets with non-zero label strings
rodzic
8c53061a4c
commit
235f3e66de
|
@ -1178,7 +1178,7 @@
|
|||
|
||||
/*global window, HTMLCanvasElement, FileReader, Audio, FileList, Map*/
|
||||
|
||||
var morphicVersion = '2020-February-26';
|
||||
var morphicVersion = '2020-March-03';
|
||||
var modules = {}; // keep track of additional loaded modules
|
||||
var useBlurredShadows = true;
|
||||
|
||||
|
@ -9609,7 +9609,7 @@ TriggerMorph.prototype.init = function (
|
|||
this.action = action || null;
|
||||
this.doubleClickAction = doubleClickAction || null;
|
||||
this.environment = environment || null;
|
||||
this.labelString = labelString || null;
|
||||
this.labelString = labelString || ' ';
|
||||
this.label = null;
|
||||
this.hint = hint || null; // null, String, or Function
|
||||
this.schedule = null; // animation slot for displaying hints
|
||||
|
|
|
@ -3471,9 +3471,6 @@ PianoMenuMorph.prototype.destroy = function () {
|
|||
|
||||
// PianoKeyMorph ///////////////////////////////////////////////////////
|
||||
|
||||
// +++ disabled for now while working on rendering
|
||||
/*
|
||||
|
||||
PianoKeyMorph.prototype = new MenuItemMorph();
|
||||
PianoKeyMorph.prototype.constructor = PianoKeyMorph;
|
||||
PianoKeyMorph.uber = MenuItemMorph.prototype;
|
||||
|
@ -3551,10 +3548,9 @@ PianoKeyMorph.prototype.createLabel = function () {
|
|||
this.label = new Morph();
|
||||
icon = this.createIcon(this.labelString[0]);
|
||||
this.label.add(icon);
|
||||
this.label.drawNew();
|
||||
this.silentSetExtent(icon.extent());
|
||||
this.bounds.setExtent(icon.extent());
|
||||
this.label.bounds = this.position().extent(this.label.extent());
|
||||
this.label.silentSetExtent(new Point(0, 0));
|
||||
this.label.bounds.setExtent(ZERO);
|
||||
this.add(this.label);
|
||||
};
|
||||
|
||||
|
@ -3590,4 +3586,3 @@ PianoKeyMorph.prototype.mouseLeave = function () {
|
|||
this.image = this.normalImage;
|
||||
this.changed();
|
||||
};
|
||||
*/
|
||||
|
|
Ładowanie…
Reference in New Issue