done with resize functionality
This commit is contained in:
@@ -260,9 +260,9 @@ struct
|
|||||||
val finish = Real32.fromInt finish / halfHeight
|
val finish = Real32.fromInt finish / halfHeight
|
||||||
|
|
||||||
val lines = helpGenGraphLinesHorizontal
|
val lines = helpGenGraphLinesHorizontal
|
||||||
(0, xClickPoints, [], halfWidth, ~1.0, 1.0)
|
(0, xClickPoints, [], halfWidth, start, finish)
|
||||||
val lines = helpGenGraphLinesVertical
|
val lines = helpGenGraphLinesVertical
|
||||||
(0, yClickPoints, lines, halfHeight, start, finish)
|
(0, yClickPoints, lines, halfHeight, ~1.0, 1.0)
|
||||||
in
|
in
|
||||||
Vector.concat lines
|
Vector.concat lines
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -374,20 +374,13 @@ struct
|
|||||||
|
|
||||||
fun resizeWindow (model, mouseX, mouseY, width, height) =
|
fun resizeWindow (model, mouseX, mouseY, width, height) =
|
||||||
let
|
let
|
||||||
val msg = String.concat
|
|
||||||
[ "resized window. "
|
|
||||||
, "width = "
|
|
||||||
, Int.toString width
|
|
||||||
, " height = "
|
|
||||||
, Int.toString height
|
|
||||||
, "\n"
|
|
||||||
]
|
|
||||||
val _ = print msg
|
|
||||||
val model = AppType.withWindowResize (model, width, height)
|
val model = AppType.withWindowResize (model, width, height)
|
||||||
|
|
||||||
val triangles = getTrianglesVector model
|
val triangles = getTrianglesVector model
|
||||||
val graphLines = #graphLines model
|
val graphLines = #graphLines model
|
||||||
val drawMsg = RESIZE_TRIANGLES_BUTTONS_AND_GRAPH {triangles = triangles,
|
val drawMsg =
|
||||||
|
RESIZE_TRIANGLES_BUTTONS_AND_GRAPH
|
||||||
|
{triangles = triangles,
|
||||||
graphLines = graphLines}
|
graphLines = graphLines}
|
||||||
in
|
in
|
||||||
(model, drawMsg, mouseX, mouseY)
|
(model, drawMsg, mouseX, mouseY)
|
||||||
|
|||||||
Reference in New Issue
Block a user