Commit 2a89dbd1 authored by Yannick Chudy's avatar Yannick Chudy

polymer integration

parent 823a2039
......@@ -272,19 +272,21 @@ def botimport(repo, content_type="html"):
#
'wait' : 4,
#template
'el': "#viz",
'background_color' : color,
'zoom' : args.get("zoom", 1200 ),
'buttons': 0, # removes play/vote buttons
'labels' : 1 if not args.get("no-labels", None ) else 0, # removes graph name/attributes
# gviz
'vtx_size' : args.get("vertex_size", 0 ),
'el': "#viz",
'background_color' : color,
'initial_size' : 16,
'vtx_size' : args.get("vertex_size", 2 ),
'show_text' : 0 if args.get("no_text" , None ) else 1, # removes vertex text
'show_nodes' : 0 if args.get("no_nodes" , None ) else 1, # removes vertex only
'show_edges' : 0 if args.get("no_edges" , None ) else 1, # removes edges
'show_images': 0 if args.get("no_images", None ) else 1, # removes vertex images
'auto_rotate': 0,
'adaptive_zoom': 0,
}
......
<!DOCTYPE html(lang='en')>
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="author" content="ynnk, a-tsioh"/>
<title>@ botapad bot2Igraph </title>
<link rel="stylesheet" href="{{static_host}}/static/bower_components/semantic-ui/dist/semantic.min.css" type="text/css"/>
<link rel="stylesheet" href="{{static_host}}/static/css/page.css" type="text/css"/>
<!-- web components-->
<script src="../static/bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<!-- require JS-->
<script data-main="../static/main" src="../static/bower_components/requirejs/require.js"></script>
<link rel="import" href="{{static_host}}/static/padagraph_webcomponents/padagraph-collection.html"/>
<link rel="import" href="{{static_host}}/static/padagraph_webcomponents/padagraph-controls.html"/>
<link rel="import" href="{{static_host}}/static/padagraph_webcomponents/padagraph-gviz.html"/>
<style>
body, .ui.grid , .row, .column, .ui.segment {
padding:0px !important;
margin:0px !important;
background-color: #12EEAA;
}
span.bold { font-weight: bold }
.column.vz { height: 50% !important }
a.multi {
position: absolute !important;
margin : 12px;
}
.ui.icon.menu {
background-color: #12EEAA;
position:absolute;
margin: 12px;
text-align: right;
top: 24px;
}
.menu.style-scope.padagraph-layout-control , .menu.style-scope.padagraph-clustering-control {
position: absolute;
left: 54px !important;
width: 250px;
}
#labels {
position:absolute;
bottom: 0px;
padding:12px;
margin:12px;
}
.markdown {
position:absolute;
bottom: 20px;
}
.menu.style-scope.padagraph-layout-control , .menu.style-scope.padagraph-clustering-control {
position: absolute;
left: 54px !important;
width: 250px;
}
padagraph-model-popup .ui.card {
position:absolute;
top: 12px;
left: 12px;
max-height: calc(100% - 24px);
overflow-y: auto;
z-index:1;
}
</style>
<body></body>
<padagraph-gviz-json routes="{{routes}}" data="{{data}}">
<padagraph-gviz options="{ &quot;background_color&quot;: &quot;#12EEAA&quot; }">
<padagraph-model-popup id="gvizpopup"></padagraph-model-popup>
<div id="menu" class="ui icon vertical borderless menu">
<padagraph-collection-filter mode="node" asitem="asitem"></padagraph-collection-filter>
<padagraph-collection-filter mode="edge" asitem="asitem"></padagraph-collection-filter>
<padagraph-engine-control engine="layout" asitem="asitem"></padagraph-engine-control>
<padagraph-engine-control engine="clustering" asitem="asitem"></padagraph-engine-control>
</div>
<div id="labels">
<padagraph-labels-control></padagraph-labels-control>
</div>
</padagraph-gviz>
</padagraph-gviz-json>
</head>
</html>
\ No newline at end of file
......@@ -126,7 +126,7 @@
margin:20px;
}
.ui.form .field label {
#importform.ui.form .field label {
color:white !important;
}
......@@ -195,6 +195,8 @@
overflow-y: auto;
z-index:10;
}
padagraph-model-popup .propvalue { color: #333; }
</style>
</head>
......@@ -364,7 +366,7 @@
</padagraph-gviz-json>
<script>
e = document.getElementById('gviz');
e.style.height = ( window.innerHeight - 20 )+ "px";
e.style.height = ( window.innerHeight - 70 )+ "px";
</script>
</div>
......@@ -431,7 +433,7 @@
<h3 class="ui inverted header">Choose a name and fill the pad url</h3>
<form class="ui form" method="post" action="{{action}}">
<form id="importform" class="ui form" method="post" action="{{action}}">
<div class="field">
<div class="ui huge input">
<input type="text" name="gid" placeholder="graph name">
......
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