add functionality to flip drawing horizontally
This commit is contained in:
@@ -369,6 +369,15 @@ struct
|
||||
in (model, [])
|
||||
end
|
||||
|
||||
fun flipHorizontally (model: app_type) =
|
||||
let
|
||||
val {layerTree, arrowX, arrowY, ...} = model
|
||||
val layerTree = LayerTree.flipHorizontally layerTree
|
||||
val model = AppWith.layerTree (model, layerTree, arrowX, arrowY)
|
||||
in
|
||||
getDrawMessage (model, [])
|
||||
end
|
||||
|
||||
fun update (model: app_type, inputMsg) =
|
||||
case inputMsg of
|
||||
MOUSE_MOVE {x = mouseX, y = mouseY} =>
|
||||
@@ -388,6 +397,7 @@ struct
|
||||
| KEY_W => updateCanvasWidth model
|
||||
| KEY_H => updateCanvasHeight model
|
||||
| KEY_M => enterMoveMode model
|
||||
| KEY_F => flipHorizontally model
|
||||
| RESIZE_WINDOW {width, height} => resizeWindow (model, width, height)
|
||||
| UNDO_ACTION => undoAction model
|
||||
| REDO_ACTION => redoAction model
|
||||
|
||||
Reference in New Issue
Block a user