@matdata/yasgui-graph-plugin 1.1.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30079,8 +30079,10 @@ var GraphPlugin = class {
30079
30079
  const themeColors = getThemeNodeColors(this.currentTheme);
30080
30080
  const { nodes, edges } = triplesToGraph(triples, prefixMap, themeColors);
30081
30081
  const container = document.createElement("div");
30082
+ container.id = "yasgui-graph-plugin-container";
30082
30083
  container.style.width = "100%";
30083
- container.style.height = "600px";
30084
+ container.style.minHeight = "500px";
30085
+ container.style.height = "100%";
30084
30086
  container.style.position = "relative";
30085
30087
  container.style.overflow = "hidden";
30086
30088
  this.yasr.resultsEl.appendChild(container);
@@ -30097,6 +30099,10 @@ var GraphPlugin = class {
30097
30099
  { nodes: nodesDataSet, edges: edgesDataSet },
30098
30100
  options
30099
30101
  );
30102
+ this.network.once("afterDrawing", () => {
30103
+ const isHorizontal = document.querySelector(".orientation-horizontal") !== null;
30104
+ container.style.height = isHorizontal ? "80vh" : "50vh";
30105
+ });
30100
30106
  this.networkReady = false;
30101
30107
  this.network.on("stabilizationIterationsDone", () => {
30102
30108
  this.network.setOptions({ physics: { enabled: true } });