From cf1ac80ef16d15d843a39aa215a4c3bfeda9d2bc Mon Sep 17 00:00:00 2001 From: Vincent Florian Date: Tue, 15 Jun 2021 21:38:08 +0200 Subject: [PATCH] [Format] elm-format applied on branch auto-res --- web-elm/src/Main.elm | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/web-elm/src/Main.elm b/web-elm/src/Main.elm index 8216720..a0b9bdd 100644 --- a/web-elm/src/Main.elm +++ b/web-elm/src/Main.elm @@ -497,11 +497,14 @@ update msg model = oldParamsForm = model.paramsForm - oldParams = model.params + oldParams = + model.params - optiLevels = getOptimumPyramids newLoaded + optiLevels = + getOptimumPyramids newLoaded - anyInt = NumberInput.intDefault + anyInt = + NumberInput.intDefault in if Set.size names == Dict.size newLoaded then case Dict.values newLoaded of @@ -514,14 +517,16 @@ update msg model = | state = ViewImgs { images = Pivot.fromCons firstImage otherImages } , viewer = Viewer.fitImage 1.0 ( toFloat firstImage.width, toFloat firstImage.height ) model.viewer , params = { oldParams | levels = optiLevels } - , paramsForm = { oldParamsForm - | crop = CropForm.withSize firstImage.width firstImage.height - , levels = - { anyInt - | min = Just 1 - , max = Just 10 - } |> NumberInput.setDefaultIntValue optiLevels - } + , paramsForm = + { oldParamsForm + | crop = CropForm.withSize firstImage.width firstImage.height + , levels = + { anyInt + | min = Just 1 + , max = Just 10 + } + |> NumberInput.setDefaultIntValue optiLevels + } , imagesCount = Set.size names } , Cmd.none @@ -952,7 +957,6 @@ minWidthHeight imgs = trueMinimum - scrollLogsToEndCmd : Cmd Msg scrollLogsToEndCmd = Task.attempt (\_ -> NoMsg) (Browser.Dom.setViewportOf "logs" 0 1.0e14) @@ -1970,6 +1974,7 @@ viewConfig ({ params, paramsForm, paramsInfo } as model) = } ] , moreInfo paramsInfo.levels "The number of levels for the multi-resolution approach. Each level halves/doubles the resolution of the previous one. The algorithm starts at the lowest resolution and transfers the converged parameters at one resolution to the initialization of the next. Increasing the number of levels enables better convergence for bigger movements but too many levels might make it definitively drift away. Targetting a lowest resolution of about 100x100 is generally good enough. The number of levels also has a joint interaction with the sparse threshold parameter so keep that in mind while changing this parameter." + -- , Element.text ("(default to " ++ String.fromInt defaultParams.levels ++ ")") -- /!\ Default number of pyramids removed in order to put a fitting number of pyramids , intInput paramsForm.levels (ParamsMsg << ChangeLevels) "Number of pyramid levels"