update to pxt 5 and pxt-common-packages 6 (#934)
* bump pxt * fix build issues * Auto-gen of projects/summary * removing feild editors moved to pxt * various typing fixes * more typing fixes * fixing various typing issues * Start on integration of new pxt * serial number fixes * gc-ify MMap object * Re-build generated files * fix console listeners * clear lf() warnings * More generated files * also auto-generated * Compilation fixes * fix merge * mostly fixing blocks * fix sim * fix field motors * enable a few features * moving to tsx * try to fix edtiro compilation * more defs * removing commands * removing extra $ * fix blockly warning * hiding images * enabling more pxt features * hide images * setup autorun * add lock on target_reset * update deps * return trylock result * updated pxt * rename video section * add alpha channel * upgraded pxt * bump pxt/version * removed alpha ref * var ceanup * don't do major bump
This commit is contained in:
committed by
Peli de Halleux
parent
ba94322d4c
commit
c5cec3a6ba
@@ -26,7 +26,7 @@ export class FieldMusic extends pxtblockly.FieldImages implements Blockly.FieldC
|
||||
this.width_ = parseInt(options.width) || 380;
|
||||
|
||||
this.setText = Blockly.FieldDropdown.prototype.setText;
|
||||
this.updateWidth = (Blockly.Field as any).prototype.updateWidth;
|
||||
this.updateSize_ = (Blockly.Field as any).prototype.updateSize_;
|
||||
this.updateTextNode_ = Blockly.Field.prototype.updateTextNode_;
|
||||
|
||||
if (!pxt.BrowserUtils.isIE() && !soundCache) {
|
||||
@@ -78,14 +78,14 @@ export class FieldMusic extends pxtblockly.FieldImages implements Blockly.FieldC
|
||||
contentDiv.style.width = (this as any).width_ + 'px';
|
||||
contentDiv.style.cssFloat = 'left';
|
||||
|
||||
dropdownDiv.style.maxHeight = `410px`;
|
||||
(dropdownDiv as HTMLElement).style.maxHeight = `410px`;
|
||||
dropdownDiv.appendChild(categoriesDiv);
|
||||
dropdownDiv.appendChild(contentDiv);
|
||||
|
||||
Blockly.DropDownDiv.setColour(this.sourceBlock_.getColour(), this.sourceBlock_.getColourTertiary());
|
||||
|
||||
// Calculate positioning based on the field position.
|
||||
let scale = this.sourceBlock_.workspace.scale;
|
||||
let scale = (<Blockly.WorkspaceSvg>this.sourceBlock_.workspace).scale;
|
||||
let bBox = { width: this.size_.width, height: this.size_.height };
|
||||
bBox.width *= scale;
|
||||
bBox.height *= scale;
|
||||
@@ -95,7 +95,7 @@ export class FieldMusic extends pxtblockly.FieldImages 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((<Blockly.WorkspaceSvg>this.sourceBlock_.workspace).getParentSvg().parentNode);
|
||||
(Blockly.DropDownDiv as any).show(this, primaryX, primaryY, secondaryX, secondaryY,
|
||||
this.onHide_.bind(this));
|
||||
|
||||
@@ -236,7 +236,7 @@ export class FieldMusic extends pxtblockly.FieldImages implements Blockly.FieldC
|
||||
|
||||
protected onHide_() {
|
||||
super.onHide_();
|
||||
Blockly.DropDownDiv.getContentDiv().style.maxHeight = '';
|
||||
(Blockly.DropDownDiv.getContentDiv() as HTMLElement).style.maxHeight = '';
|
||||
this.stopSounds();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user