add scaffolding in imperative shell to help update canvas width and height
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user