diff --git a/examples/bottleneck/init.js b/examples/bottleneck/init.js index d147586..5e2c48d 100644 --- a/examples/bottleneck/init.js +++ b/examples/bottleneck/init.js @@ -1,4 +1,4 @@ -export function init(canvas, parameters, options){ +export async function init(canvas, parameters, options){ // Simply saving the context for 2D environments return { ctx: canvas.getContext('2d') diff --git a/examples/bottleneck/render.js b/examples/bottleneck/render.js index 9e608b1..32becaa 100644 --- a/examples/bottleneck/render.js +++ b/examples/bottleneck/render.js @@ -1,4 +1,4 @@ -export function render(ui_state, parameters, state, action) { +export async function render(ui_state, parameters, state, action) { const ctx = ui_state.ctx ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); const canvasWidth = ctx.canvas.width; diff --git a/examples/pendulum-simple/init.js b/examples/pendulum-simple/init.js index d147586..5e2c48d 100644 --- a/examples/pendulum-simple/init.js +++ b/examples/pendulum-simple/init.js @@ -1,4 +1,4 @@ -export function init(canvas, parameters, options){ +export async function init(canvas, parameters, options){ // Simply saving the context for 2D environments return { ctx: canvas.getContext('2d') diff --git a/examples/pendulum-simple/render.js b/examples/pendulum-simple/render.js index 71601ab..1d3f16b 100644 --- a/examples/pendulum-simple/render.js +++ b/examples/pendulum-simple/render.js @@ -1,4 +1,4 @@ -export function render(ui_state, parameters, state, action) { +export async function render(ui_state, parameters, state, action) { const ctx = ui_state.ctx ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); diff --git a/examples/pendulum/init.js b/examples/pendulum/init.js index d147586..5e2c48d 100644 --- a/examples/pendulum/init.js +++ b/examples/pendulum/init.js @@ -1,4 +1,4 @@ -export function init(canvas, parameters, options){ +export async function init(canvas, parameters, options){ // Simply saving the context for 2D environments return { ctx: canvas.getContext('2d') diff --git a/examples/pendulum/render.js b/examples/pendulum/render.js index 856436b..7439125 100644 --- a/examples/pendulum/render.js +++ b/examples/pendulum/render.js @@ -1,4 +1,4 @@ -export function render(ui_state, parameters, state, action) { +export async function render(ui_state, parameters, state, action) { const ctx = ui_state.ctx ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); diff --git a/external/ace-builds b/external/ace-builds index 3643275..32003b7 160000 --- a/external/ace-builds +++ b/external/ace-builds @@ -1 +1 @@ -Subproject commit 3643275c7bc367387fad961ccd748ef9d1f5b53c +Subproject commit 32003b70d0683427b7eebad03c90335760b13738 diff --git a/index.css b/index.css index fca11ad..7ab493a 100644 --- a/index.css +++ b/index.css @@ -42,6 +42,9 @@ body { resize: vertical; box-sizing: border-box; } +.editor{ + max-height: 90vh; +} textarea:focus { box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Slightly larger shadow on focus for a subtle effect */ diff --git a/index.js b/index.js index 5461bb7..1d52c6c 100644 --- a/index.js +++ b/index.js @@ -20,6 +20,7 @@ window.addEventListener('load', () => { const numberOfRows = Math.max(3, editor.session.getLength()); const newHeight = numberOfRows * rowHeight; editorContainer.style.height = `${newHeight}px`; + editorContainer.style.maxHeight = `90vh`; editor.resize(); }