From 4f51ea222c7e5bf3b610700e58e10301850ed0ef Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Mon, 28 Jan 2019 18:04:37 -0800 Subject: [PATCH] Changed the trashcan lid to always open towards the workspace. --- core/trashcan.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/trashcan.js b/core/trashcan.js index ba6dcfe96..5c1624083 100644 --- a/core/trashcan.js +++ b/core/trashcan.js @@ -398,9 +398,11 @@ Blockly.Trashcan.prototype.animateLid_ = function() { * @private */ Blockly.Trashcan.prototype.setLidAngle_ = function(lidAngle) { + var openAtRight = this.workspace_.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT + || (this.workspace_.horizontalLayout && this.workspace_.RTL); this.svgLid_.setAttribute('transform', 'rotate(' + - (this.workspace_.RTL ? -lidAngle : lidAngle) + ',' + - (this.workspace_.RTL ? 4 : this.WIDTH_ - 4) + ',' + + (openAtRight ? -lidAngle : lidAngle) + ',' + + (openAtRight ? 4 : this.WIDTH_ - 4) + ',' + (this.LID_HEIGHT_ - 2) + ')'); };