Skip to content

Commit bd9b331

Browse files
authored
sound-editor.jsx -- redo some stylings with new api
1 parent f838094 commit bd9b331

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/containers/sound-editor.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ class SoundEditor extends React.Component {
507507
const pitchParts = pitchDiv.children;
508508
const volumeParts = volumeDiv.children;
509509
const menu = window.ScratchBlocks.customPrompt(
510-
"Modify Sound", { width: 200, height: 280 },
510+
"Modify Sound", { width: 200, height: "auto" },
511511
{
512512
name: "Apply", callback: () => {
513513
audio.close();
@@ -522,7 +522,7 @@ class SoundEditor extends React.Component {
522522
{ name: "Cancel", callback: () => audio.close() },
523523
);
524524

525-
menu.style = "margin: 0 10px 0 10px;position: relative;display: flex;justify-content: flex-end;flex-direction: row;height: calc(100% - (3.125em + 2.125em + 16px));align-items: center;";
525+
menu.setAttribute("style", "margin: 0 10px 15px 10px;position: relative;display: flex;justify-content: flex-end;flex-direction: row;height: calc(100% - (3.125em + 2.125em + 16px));align-items: center;");
526526
menu.append(pitchDiv, volumeDiv);
527527

528528
const previewButton = document.createElement("button");
@@ -618,7 +618,7 @@ class SoundEditor extends React.Component {
618618
let selectedSampleRate = this.props.sampleRate;
619619
let selectedForceRate = false;
620620
const menu = window.ScratchBlocks.customPrompt(
621-
"Format Sound", { width: 350, height: 300 },
621+
"Format Sound", { width: 350, height: "auto" },
622622
{
623623
name: "Apply", callback: () => {
624624
const edits = { sampleRate: selectedSampleRate };
@@ -629,7 +629,7 @@ class SoundEditor extends React.Component {
629629
{ name: "Cancel", callback: () => {} },
630630
);
631631

632-
menu.style = "padding: 10px 20px;";
632+
menu.style.marginBottom = "15px";
633633
const rateTitle = genTitle("New Sample Rate:");
634634

635635
const rateSelector = document.createElement("select");

0 commit comments

Comments
 (0)