From cfdb113a218a34b532a9ab136c5ceb067b504153 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 6 Mar 2019 08:32:18 -0800 Subject: [PATCH] more typing fixes --- fieldeditors/field_motors.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fieldeditors/field_motors.ts b/fieldeditors/field_motors.ts index e04e7b15..a8f3f891 100644 --- a/fieldeditors/field_motors.ts +++ b/fieldeditors/field_motors.ts @@ -401,7 +401,7 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC if (Blockly.DropDownDiv.hideIfOwner(this)) { return; } - this.isFirst_ = e.clientX - this.getScaledBBox_().left < ((this as any).width1 * this.sourceBlock_.workspace.scale); + this.isFirst_ = e.clientX - this.getScaledBBox_().left < ((this as any).width1 * (this.sourceBlock_.workspace).scale); // If there is an existing drop-down someone else owns, hide it immediately and clear it. Blockly.DropDownDiv.hideWithoutAnimation(); Blockly.DropDownDiv.clearContent(); @@ -538,7 +538,7 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC let secondaryX = primaryX; let secondaryY = position.top; // Set bounds to workspace; show the drop-down. - (Blockly.DropDownDiv as any).setBoundsElement(this.sourceBlock_.workspace.getParentSvg().parentNode); + (Blockly.DropDownDiv as any).setBoundsElement((this.sourceBlock_.workspace).getParentSvg().parentNode); (Blockly.DropDownDiv as any).show(this, primaryX, primaryY, secondaryX, secondaryY, this.onHide_.bind(this));