initialize trigger widgets with non-zero label strings

pull/95/head
jmoenig 2020-03-03 17:23:49 +01:00
rodzic 8c53061a4c
commit 235f3e66de
2 zmienionych plików z 4 dodań i 9 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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();
};
*/