diff --git a/fieldeditors/field_motors.ts b/fieldeditors/field_motors.ts index f904ca28..069d7c30 100644 --- a/fieldeditors/field_motors.ts +++ b/fieldeditors/field_motors.ts @@ -94,6 +94,7 @@ export class FieldMotors extends pxtblockly.FieldImages implements Blockly.Field // Store a data attribute on all possible click targets so we can match it to the icon. button.setAttribute('data-value', value); buttonImg.setAttribute('data-value', value); + buttonImg.style.height = 'auto'; button.appendChild(buttonImg); if (this.addLabel_) { const buttonText = this.createTextNode_(content.alt); @@ -106,6 +107,8 @@ export class FieldMotors extends pxtblockly.FieldImages implements Blockly.Field contentDiv.appendChild(button); } contentDiv.style.width = (this as any).width_ + 'px'; + contentDiv.style.display = 'flex'; + contentDiv.style.alignItems = 'stretch'; dropdownDiv.appendChild(contentDiv); Blockly.DropDownDiv.setColour(sourceBlock.getColour(), sourceBlock.getColourTertiary()); diff --git a/libs/color-sensor/color.ts b/libs/color-sensor/color.ts index c3f28895..6894e349 100644 --- a/libs/color-sensor/color.ts +++ b/libs/color-sensor/color.ts @@ -120,7 +120,7 @@ namespace sensors { "brown"][this._query()[0]]]; case ColorSensorMode.AmbientLightIntensity: case ColorSensorMode.ReflectedLightIntensity: - return [`${this._query()}%`]; + return [`${this._query()[0]}%`]; case ColorSensorMode.RgbRaw: return this._query().map(number => number.toString()); default: diff --git a/package.json b/package.json index bf69cf97..74021cf9 100644 --- a/package.json +++ b/package.json @@ -42,11 +42,11 @@ "react": "16.8.3", "react-dom": "16.11.0", "semantic-ui-less": "2.4.1", - "typescript": "^4.2.3" + "typescript": "4.8.3" }, "dependencies": { - "pxt-common-packages": "11.1.2", - "pxt-core": "9.1.23" + "pxt-common-packages": "11.1.6", + "pxt-core": "9.3.13" }, "scripts": { "test": "node node_modules/pxt-core/built/pxt.js travis"