From 138e4b2e0e0bb36f67440de667baf1307d8667c1 Mon Sep 17 00:00:00 2001 From: Dmitriy Antipov Date: Fri, 2 Feb 2024 19:19:45 +0300 Subject: [PATCH] Bump pxt-core and some other changes and fixes (#1043) * fix-info-method-for-ambient-ref-mods I made a bug in the previous changes. [object] was displayed on the screen in these modes * bump-pxt-9.3.5 * bump-pxt-core-and-common-packages * height-of-field-motors-btn-is-same-for-everyone Set the height of the field-motors buttons to be the same for all. * typescipt-bump-4.8.3 I upgraded the ts version to the arcade version. * bump-pxt-9.3.10 * bump-pxt-9.3.11 * pxt-core-and-common-packages-bump --- fieldeditors/field_motors.ts | 3 +++ libs/color-sensor/color.ts | 2 +- package.json | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) 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"