Skip to content

Commit

Permalink
#113 - Calls applyVisualProperties in exportAsGexf
Browse files Browse the repository at this point in the history
  • Loading branch information
jacomyal committed Sep 8, 2023
1 parent 9fd8ee2 commit 38ff268
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/graph/useExportAsGexf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { toUndirected } from "graphology-operators";

import { dataGraphToFullGraph } from "./utils";
import { useFilteredGraph, useGraphDataset } from "../context/dataContexts";
import { applyVisualProperties } from "../appearance/utils";
import { visualGettersAtom } from "./index";

export function useExportAsGexf() {
const [loading, setLoading] = useState<boolean>(false);
Expand All @@ -20,6 +22,8 @@ export function useExportAsGexf() {
setError(null);
// get the full graph
let graphToExport = dataGraphToFullGraph(graphDataset, filteredGraph);
const visualGetters = visualGettersAtom.get();
applyVisualProperties(graphToExport, graphDataset, visualGetters);

// change the type of the graph based on the meta type (default is directed)
if (graphDataset.metadata.type === "undirected") graphToExport = toUndirected(graphToExport);
Expand Down

0 comments on commit 38ff268

Please sign in to comment.