update 'changeCanvasWidth/Height' functions to use layer tree
This commit is contained in:
@@ -875,7 +875,7 @@ struct
|
||||
}
|
||||
end
|
||||
|
||||
fun canvasWidth (app: app_type, newCanvasWidth) =
|
||||
fun canvasWidth (app: app_type, newCanvasWidth, newLayerTree) =
|
||||
let
|
||||
val
|
||||
{ mode
|
||||
@@ -900,11 +900,10 @@ struct
|
||||
, b
|
||||
, a
|
||||
, layer
|
||||
, layerTree
|
||||
, layerTree = _
|
||||
, modalNum
|
||||
} = app
|
||||
|
||||
val squares = changeSquaresSize (squares, newCanvasWidth, canvasHeight)
|
||||
val arrowX = Int.min (arrowX, newCanvasWidth)
|
||||
val (xClickPoints, yClickPoints) =
|
||||
ClickPoints.generate
|
||||
@@ -932,12 +931,12 @@ struct
|
||||
, b = b
|
||||
, a = a
|
||||
, layer = layer
|
||||
, layerTree = layerTree
|
||||
, layerTree = newLayerTree
|
||||
, modalNum = 0
|
||||
}
|
||||
end
|
||||
|
||||
fun canvasHeight (app: app_type, newCanvasHeight) =
|
||||
fun canvasHeight (app: app_type, newCanvasHeight, newLayerTree) =
|
||||
let
|
||||
val
|
||||
{ mode
|
||||
@@ -962,11 +961,10 @@ struct
|
||||
, b
|
||||
, a
|
||||
, layer
|
||||
, layerTree
|
||||
, layerTree = _
|
||||
, modalNum
|
||||
} = app
|
||||
|
||||
val squares = changeSquaresSize (squares, canvasWidth, newCanvasHeight)
|
||||
val arrowY = Int.min (arrowY, newCanvasHeight)
|
||||
val (xClickPoints, yClickPoints) =
|
||||
ClickPoints.generate
|
||||
@@ -994,7 +992,7 @@ struct
|
||||
, b = b
|
||||
, a = a
|
||||
, layer = layer
|
||||
, layerTree = layerTree
|
||||
, layerTree = newLayerTree
|
||||
, modalNum = 0
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user