Skip to content

Commit

Permalink
Bump pxt-core and some other changes and fixes (#1043)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
THEb0nny authored Feb 2, 2024
1 parent 5e59778 commit 138e4b2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions fieldeditors/field_motors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion libs/color-sensor/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 138e4b2

Please sign in to comment.