From 562788706f312c2ab391171670bc192290f5f1d9 Mon Sep 17 00:00:00 2001 From: Frames White Date: Wed, 21 Jun 2023 20:49:21 +0800 Subject: [PATCH 1/2] use > rather than round(bool) Fixes to work on pre-julia 1.7 As pointed out by @mtfishman in https://github.com/oxinabox/LayeredLayouts.jl/pull/26#issuecomment-1600683923 --- src/zarate.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zarate.jl b/src/zarate.jl index e44ddcd..e8b80af 100644 --- a/src/zarate.jl +++ b/src/zarate.jl @@ -232,7 +232,7 @@ end function order_layers!(layer2nodes, is_before) # Cunning trick: we need to go from the `before` matrix to an actual order list # we can do this by sorting when having `lessthan` read from the `before` matrix - is_before_func(n1, n2) = round(Bool, value(is_before[n1=>n2]))::Bool + is_before_func(n1, n2) = value(is_before[n1=>n2]) > 0.5 for layer in layer2nodes sort!(layer; lt=is_before_func) end From c1c63dbbe3c43a2241d899e1087a817f81128459 Mon Sep 17 00:00:00 2001 From: Frames White Date: Wed, 21 Jun 2023 20:50:01 +0800 Subject: [PATCH 2/2] bump version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 890871f..b4201fd 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "LayeredLayouts" uuid = "f4a74d36-062a-4d48-97cd-1356bad1de4e" authors = ["Frames White and contributors"] -version = "0.2.8" +version = "0.2.9" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"