correct display of XRay checkbox

pull/68/head
Michael Aschauer 2019-01-16 22:47:24 -08:00
rodzic 6bd731b4b6
commit 1db69bd4a1
2 zmienionych plików z 34 dodań i 27 usunięć

Wyświetl plik

@ -1031,9 +1031,9 @@ IDE_Morph.prototype.aboutTurtleStitch = function () {
IDE_Morph.prototype.createStatusDisplay = function () {
var frame,
padding = 1,
myself = this,
elements = [],
stage = this.stage;
myself = this,
elements = [],
stage = this.stage;
if (this.statusDisplay) {
this.statusDisplay.destroy();
@ -1254,31 +1254,35 @@ IDE_Morph.prototype.createStatusDisplay = function () {
resetCameraButton.columns = 4;
resetCameraButton.newColumn = 2;
var XRayButton = new ToggleMorph(
'checkbox',
null,
function () {
if (stage.isXRay) {
myself.showMessage("turn off X-RAY ...");
window.setTimeout(
function() {
stage.turnXRayOff();
myself.showMessage("done",0.4);
}, 250);
} else {
myself.showMessage("rendering X-RAY ...");
window.setTimeout(
function() {
stage.turnXRayOn();
myself.showMessage("done", 0.4);
} ,250);
}
},
'X-Ray',
function () {
return stage.isXRay;
});
'checkbox',
null,
function () {
if (stage.isXRay) {
myself.showMessage("turn off X-RAY ...");
window.setTimeout(
function() {
stage.turnXRayOff();
myself.showMessage("done",0.4);
myself.XRayButton.refresh();
}, 250);
} else {
myself.showMessage("rendering X-RAY ...");
window.setTimeout(
function() {
stage.turnXRayOn();
myself.showMessage("done", 0.4);
myself.XRayButton.refresh();
} ,250);
}
},
'X-Ray',
function () {
return stage.getIsXRay();
});
elements.push(XRayButton);
myself.XRayButton = XRayButton;
XRayButton.columns = 4;
XRayButton.newColumn = 3;

Wyświetl plik

@ -2859,7 +2859,6 @@ StageMorph.prototype.turnXRayOn = function () {
this.children[0].addStitch(stitch[0][0], stitch[0][1], stitch[1][0], stitch[1][1], angle)
}
this.renderer.changed = true;
}
@ -2908,6 +2907,10 @@ StageMorph.prototype.turnXRayOff = function () {
}
StageMorph.prototype.getIsXRay = function () {
return this.isXRay;
}
StageMorph.prototype.clearPenTrails = nop;
StageMorph.prototype.penTrails = function () {