add scaffolding in imperative shell to help update canvas width and height

This commit is contained in:
2025-07-11 17:45:16 +01:00
parent 08ed5cc3d5
commit e3729a1ce5
6 changed files with 11 additions and 3 deletions

View File

@@ -252,8 +252,9 @@ struct
fun updateBlue model = (AppWith.b model, [])
fun updateAlpha model = (AppWith.a model, [])
fun updateCanvasWidth (model, newCanvasWidth) =
fun updateCanvasWidth model =
let
val newCanvasWidth = #modalNum model
val model = AppWith.canvasWidth (model, newCanvasWidth)
val
@@ -322,7 +323,7 @@ struct
| KEY_G => updateGreen model
| KEY_B => updateBlue model
| KEY_A => updateAlpha model
| KEY_W newCanvasWidth => updateCanvasWidth (model, newCanvasWidth)
| KEY_W => updateCanvasWidth model
| RESIZE_WINDOW {width, height} => resizeWindow (model, width, height)
| UNDO_ACTION => undoAction model
| REDO_ACTION => redoAction model