diff --git a/dotscape b/dotscape index db63536..8765674 100755 Binary files a/dotscape and b/dotscape differ diff --git a/fcore/app-with.sml b/fcore/app-with.sml index f52d8f9..f749b20 100644 --- a/fcore/app-with.sml +++ b/fcore/app-with.sml @@ -1000,7 +1000,7 @@ struct } end - fun useLayerTree (app: app_type, layerTree, canvasWidth, canvasHeight) : + fun parsedLayerTree (app: app_type, layerTree, canvasWidth, canvasHeight) : app_type = let val @@ -1028,6 +1028,11 @@ struct , layerTree = _ , modalNum } = app + + val arrowX = + if canvasWidth = 0 then 0 else Int.min (canvasWidth - 1, arrowX) + val arrowY = + if canvasHeight = 0 then 0 else Int.min (canvasHeight - 1, arrowY) in { mode = mode , mouseX = mouseX diff --git a/fcore/normal-mode.sml b/fcore/normal-mode.sml index a8f88bf..402fef5 100644 --- a/fcore/normal-mode.sml +++ b/fcore/normal-mode.sml @@ -337,7 +337,7 @@ struct fun useLayers (model, layerTree, canvasWidth, canvasHeight) = let val model = - AppWith.layerTree (model, layerTree, canvasWidth, canvasHeight) + AppWith.parsedLayerTree (model, layerTree, canvasWidth, canvasHeight) in getDrawMessage model end