diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/class/Modelhome.php | 2 | ||||
-rw-r--r-- | app/view/templates/map.php | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/app/class/Modelhome.php b/app/class/Modelhome.php index 37eb549..2aedae3 100644 --- a/app/class/Modelhome.php +++ b/app/class/Modelhome.php @@ -156,7 +156,7 @@ class Modelhome extends Modelpage } $datas['elements'] = array_merge($nodes, $edges); - $datas['layout']['name'] = 'preset'; + $datas['layout']['name'] = 'random'; $datas['style'] = [ 'selector' => 'node', 'style' => [ diff --git a/app/view/templates/map.php b/app/view/templates/map.php index 236ff8e..83e6004 100644 --- a/app/view/templates/map.php +++ b/app/view/templates/map.php @@ -1,5 +1,15 @@ -<pre> +<style> + #graph { + height: 100%; + width: 100%; + } +</style> - <?= $json ?> +<div id="graph"></div> -</pre>
\ No newline at end of file +<script> + var data = <?= $json ?>; + console.log(data); +</script> + +<script src="<?= Wcms\Model::jspath() ?>map.bundle.js"></script>
\ No newline at end of file |