From 41c51a9da3685ba537565946e94cff1f571d5413 Mon Sep 17 00:00:00 2001
From: amandaghassaei <amandaghassaei@gmail.com>
Date: Fri, 12 May 2017 13:32:15 -0400
Subject: [PATCH] show num of each edge type

---
 index.html    | 8 ++++----
 js/pattern.js | 5 +++++
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/index.html b/index.html
index f6411af..898e0a0 100755
--- a/index.html
+++ b/index.html
@@ -586,19 +586,19 @@
                 <div id="edgeVisOptions" class="indent">
                     <label class="checkbox" for="mtnsVisible">
                         <input id="mtnsVisible" data-toggle="checkbox" class="custom-checkbox layersSelector" type="checkbox"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
-                        Mountains
+                        Mountains <span id="numMtns"></span>
                     </label>
                     <label class="checkbox" for="valleysVisible">
                         <input id="valleysVisible" data-toggle="checkbox" class="custom-checkbox layersSelector" type="checkbox"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
-                        Valleys
+                        Valleys <span id="numValleys"></span>
                     </label>
                     <label class="checkbox" for="panelsVisible">
                         <input id="panelsVisible" data-toggle="checkbox" class="custom-checkbox layersSelector" type="checkbox"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
-                        Facet Creases
+                        Facet Creases <span id="numFacets"></span>
                     </label>
                     <label class="checkbox" for="passiveEdgesVisible">
                         <input id="passiveEdgesVisible" data-toggle="checkbox" class="custom-checkbox layersSelector" type="checkbox"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
-                        Undriven Edges
+                        Undriven Edges <span id="numPassive"></span>
                     </label>
                 </div>
             </div><br/>
diff --git a/js/pattern.js b/js/pattern.js
index da20309..83522ef 100755
--- a/js/pattern.js
+++ b/js/pattern.js
@@ -220,6 +220,11 @@ function initPattern(globals){
 
         var allEdges = outlines.concat(mountains).concat(valleys).concat(cuts).concat(triangulations);
 
+        $("#numMtns").html("(" + mountains.length + ")");
+        $("#numValleys").html("(" + valleys.length + ")");
+        $("#numFacets").html("(" + triangulations.length + ")");
+        $("#numPassive").html("(" + outlines.length + ")");
+
         polygons = findPolygons(allEdges);
         var faces = triangulatePolys(polygons, allEdges);
 
-- 
GitLab