Commit 5dbb665d authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[graph] add _camera_angle

parent 924aeb1c
Pipeline #3429 passed with stage
in 91 minutes and 43 seconds
......@@ -105,7 +105,7 @@ instance ToSchema MultiPartite where
declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "_multipartite_")
makeLenses ''MultiPartite
defaultMultipartite :: MultiPartite
defaultMultipartite :: MultiPartite
defaultMultipartite = MultiPartite a a
where
a = Partite HashSet.empty NgramsTerms
......@@ -203,7 +203,8 @@ data GraphV3 = GraphV3 { go_links :: [EdgeV3]
$(deriveJSON (unPrefix "go_") ''GraphV3)
-----------------------------------------------------------
data Camera = Camera { _camera_ratio :: Double
data Camera = Camera { _camera_angle :: Double
, _camera_ratio :: Double
, _camera_x :: Double
, _camera_y :: Double }
deriving (Show, Generic)
......@@ -222,7 +223,7 @@ $(deriveJSON (unPrefix "_") ''HyperdataGraph)
instance ToSchema HyperdataGraph where
declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "_")
defaultHyperdataGraph :: HyperdataGraph
defaultHyperdataGraph :: HyperdataGraph
defaultHyperdataGraph = HyperdataGraph Nothing Nothing
......
......@@ -194,7 +194,7 @@ computeGraph corpusId partitionMethod bridgeMethod similarity strength (nt1,nt2)
lIds <- selectNodesWithUsername NodeList userMaster
-- Getting the Ngrams to compute with and grouping it according to the lists
let
let
groupedContextsByNgrams nt corpusId' (lists_master, lists_user) = do
let
ngs = filterListWithRoot [MapTerm] $ mapTermListRoot lists_user nt repo
......@@ -205,7 +205,7 @@ computeGraph corpusId partitionMethod bridgeMethod similarity strength (nt1,nt2)
(m1,m2) <- do
m1 <- groupedContextsByNgrams nt1 corpusId (lIds, [lId])
if nt1 == nt2
then
then
pure (m1,m1)
else do
m2 <- groupedContextsByNgrams nt2 corpusId (lIds, [lId])
......@@ -369,4 +369,3 @@ getGraphGexf :: FlowCmdM env err m
getGraphGexf uId nId = do
HyperdataGraphAPI { _hyperdataAPIGraph = graph } <- getGraph uId nId
pure $ addHeader "attachment; filename=graph.gexf" graph
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment