tweaked transparency of grabbed morphs

pull/95/head
jmoenig 2020-07-20 18:27:25 +02:00
rodzic 75829340bd
commit 217bba78ed
3 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -7,6 +7,7 @@
* morphic: update the Hand's position on mouse-down - avoid triggering at the origin point
* symbols: added hooks for dynamic coloring
* blocks: added blocks-fading support for symbols (under construction)
* morphic: tweaked transparency of grabbed morphs
### 2020-07-19
* blocks: blocks-fade-out support for label arrows (under construction)

Wyświetl plik

@ -5731,7 +5731,7 @@ ReporterBlockMorph.prototype.prepareToBeGrabbed = function (handMorph) {
this.setPosition(oldPos);
}
ReporterBlockMorph.uber.prepareToBeGrabbed.call(this, handMorph);
this.alpha = Math.min(this.alpha, 0.85);
handMorph.alpha = this.alpha < 1 ? 1 : 0.85;
this.cachedSlotSpec = null;
};

Wyświetl plik

@ -11149,7 +11149,7 @@ HandMorph.prototype.fullDrawOn = function (ctx, rect) {
if (!clipped.extent().gt(ZERO)) {return; }
ctx.save();
ctx.globalAlpha = this.children[0].alpha;
ctx.globalAlpha = this.alpha;
pic = this.cachedFullImage;
src = clipped.translateBy(pos.neg());
sl = src.left();
@ -11233,6 +11233,7 @@ HandMorph.prototype.grab = function (aMorph) {
HandMorph.prototype.drop = function () {
var target, morphToDrop;
this.alpha = 1;
if (this.children.length !== 0) {
morphToDrop = this.children[0];
target = this.dropTargetFor(morphToDrop);