Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pxt-core and some other changes and fixes #1043

Merged
merged 8 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading