Permalink
Browse files

Add LMM toggler. Add few indexes for world layout.

  • Loading branch information...
1 parent fef2b5c commit c7b3376983ca149d80f7f588e8ff53a92d1b3bbc @arcusfelis committed Dec 28, 2012
Showing with 234 additions and 37 deletions.
  1. +1 −0 priv/css_src/relatio.css
  2. +34 −1 priv/html/index.html
  3. +29 −0 priv/js_src/relatio.js
  4. +167 −35 priv/js_src/relatio.world.js
  5. +2 −1 src/relatio.app.src
  6. +1 −0 src/relatio.erl
@@ -434,6 +434,7 @@ body.world li {
font-size: 16pt;
position: relative;
content: "\2610"; // ☐
+ cursor: pointer;
}
.checkbox.selected:before {
content: "\2611"; // ☐
View
@@ -29,7 +29,7 @@
</head>
-<body class="source-color active-tip-switch main-selected world">
+<body class="source-color active-tip-switch main-selected world active-lmm">
<div id="container">
<div id="top-panel">
@@ -65,6 +65,14 @@
title="Hide &quot;module-to-module&quot; edges.">MM</a>
</span>
<span class="delim">|</span>
+ <span id="lmm-edge-switch"
+ class="disable-mouse-selection active-block sub-block">
+ <a tabindex="0" class="header-closed"
+ title="Show local &quot;module-to-module&quot; edges.">LMM</a>
+ <a tabindex="0" class="header-opened"
+ title="Hide local &quot;module-to-module&quot; edges.">LMM</a>
+ </span>
+ <span class="delim">|</span>
<span id="edge-direction-selector" class="disable-mouse-selection">
<a tabindex="0" id="source-color"
title="Set the edge color of the target node.">S</a>
@@ -108,6 +116,31 @@
<div id="module-list" class="content-block"></div>
</div>
+ <div id="local-directions-out" class="sub-block active-block cb-block">
+ <div class="sub-block-header">
+ <span class="header-group">
+ <span class="checkbox group-checkbox"></span>
+ <a tabindex="0" class="header-closed">Calls locally to&hellip;</a>
+ <a tabindex="0" class="header-opened">Calls locally to:</a>
+ </span>
+ <span class="local-direction-out-count header-count-info"></span>
+ </div>
+ <div id="local-directions-list-out" class="content-block"></div>
+ </div>
+
+ <div id="local-directions-in" class="sub-block active-block cb-block">
+ <div class="sub-block-header">
+ <span class="header-group">
+ <span class="checkbox group-checkbox"></span>
+ <a tabindex="0" class="header-closed">Called locally from&hellip;</a>
+ <a tabindex="0" class="header-opened">Called locally from:</a>
+ </span>
+ <span class="local-direction-in-count header-count-info"></span>
+ </div>
+ <div id="local-directions-list-in" class="content-block"></div>
+ </div>
+
+
<div id="directions-out" class="sub-block active-block cb-block">
<div class="sub-block-header">
<span class="header-group">
@@ -12,6 +12,35 @@ sigma.publicPrototype.showNodes = function(node_ids) {
}, node_ids);
}
+sigma.publicPrototype.showEdges = function(edge_ids, group_name) {
+ // If the group name is specified.
+ if (group_name)
+ {
+ this._index = this._index || [];
+ var idx = this._index;
+
+ // Hide edges that were previously registered under the name.
+ if (idx[group_name])
+ {
+ var old_edge_ids = idx[group_name];
+ this.iterEdges(function(e) {
+ e.hidden = true;
+ }, old_edge_ids);
+ }
+
+ idx[group_name] = edge_ids;
+ }
+
+ this.iterEdges(function(e) {
+ e.hidden = false;
+ }, edge_ids);
+}
+
+sigma.publicPrototype.hideEdges = function(edge_ids) {
+ this.iterEdges(function(e) {
+ e.hidden = false;
+ }, edge_ids);
+}
sigma.publicPrototype.borderNodes = function(onlyVisibleNodes) {
var topNode, bottomNode, leftNode, rightNode;
Oops, something went wrong. Retry.

0 comments on commit c7b3376

Please sign in to comment.