Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Correct web API boolean representation.

  • Loading branch information...
commit 520680617c715e387a2e417cf34ecb50910945a7 1 parent 6a056c8
@colah authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 implicitsnap.hs
View
6 implicitsnap.hs
@@ -103,11 +103,13 @@ getWidth (varlookup, obj:_, _) = max (x2-x1) (y2-y1)
executeAndExport :: String -> String -> Maybe String -> String
executeAndExport content callback maybeFormat =
let
+ showB True = "true"
+ showB False = "false"
callbackF :: Bool -> Bool -> Float -> String -> String
callbackF False is2D w msg =
- callback ++ "([null," ++ show msg ++ "," ++ show is2D ++ "," ++ show w ++ "]);"
+ callback ++ "([null," ++ show msg ++ "," ++ showB is2D ++ "," ++ show w ++ "]);"
callbackF True is2D w msg =
- callback ++ "([new Shape()," ++ show msg ++ "," ++ show is2D ++ "," ++ show w ++ "]);"
+ callback ++ "([new Shape()," ++ show msg ++ "," ++ showB is2D ++ "," ++ show w ++ "]);"
callbackS str msg = callback ++ "([" ++ show str ++ "," ++ show msg ++ ",null,null]);"
in case runOpenscad content of
Left err ->
Please sign in to comment.
Something went wrong with that request. Please try again.