Skip to content

Commit

Permalink
cleaned up code a little bit
Browse files Browse the repository at this point in the history
  • Loading branch information
vijayrudraraju committed Aug 9, 2011
1 parent 65dec4d commit d263201
Show file tree
Hide file tree
Showing 4 changed files with 260 additions and 575 deletions.
183 changes: 27 additions & 156 deletions css/vizmapper.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,13 @@ span {



.graphColor {
.viewColor {
background:rgb(187,187,187);
}
.listColor {
.editColor {
background:rgb(187,187,227);
}
.rawColor {
background:rgb(220,220,220);
}
.grey {
background:rgba(180,180,180,255);
}
.blue {
background:rgba(100,160,255,255);
}
.green {
background:rgba(0,255,0,255);
}
.yellow {
background:rgba(255,255,0,255);
}
.red {
background:rgba(200,0,0,255);
}

.inactive {
background:black;
color:white;
Expand Down Expand Up @@ -179,26 +162,10 @@ span {
font-family:monospace;
display:none;
}
#taggingHelp {
z-index:4;
position:absolute;
font-size:20px;
font-family:monospace;
display:none;
}


#rawTab {
z-index:3;
position:absolute;
left:240px;
width:100px;
height:40px;
padding:10px;
font-size:20px;
font-family:monospace;
}
#graphTab {

#viewTab {
z-index:3;
position:absolute;
left:0px;
Expand All @@ -208,7 +175,7 @@ span {
font-size:20px;
font-family:monospace;
}
#listTab {
#editTab {
z-index:3;
position:absolute;
left:120px;
Expand All @@ -218,96 +185,9 @@ span {
font-size:20px;
font-family:monospace;
}
#signalsTab {
z-index:3;
position:absolute;
top:64px;
left:880px;
width:120px;
height:20px;
padding:6px;
font-size:20px;
font-family:monospace;
display:none;
}
#mappingsTab {
z-index:3;
position:absolute;
top:64px;
left:1000px;
width:120px;
height:20px;
padding:6px;
font-size:20px;
font-family:monospace;
display:none;
}
#executeText {
z-index:1;
color:rgba(0,0,0,0);
position:absolute;
left:280px;
top:11px;
height:30px;
width:780px;
font-size:20px;
font-family:monospace;
background:white;
border:0px;
padding:0px;
padding-top:8px;
padding-left:2px;
display:none;
}
#executeInput {
z-index:2;
color:rgba(0,0,0,255);
position:absolute;
left:280px;
top:14px;
height:30px;
width:780px;
font-size:20px;
font-family:monospace;
background:transparent;
border:0px;
display:none;
}
#executeButton {
z-index:3;
position:absolute;
top:10px;
left:1080px;
width:100px;
height:40px;
font-size:20px;
font-family:monospace;
display:none;
}
/*
.view {
width:900px;
}
.modify {
width:780px;
}
*/
#filterText {
z-index:1;
color:rgba(0,0,0,0);
position:absolute;
left:530px;
top:11px;
height:30px;
width:650px;
font-size:20px;
font-family:monospace;
background:white;
border:0px;
padding:0px;
padding-top:8px;
padding-left:2px;
}



#filterInput {
z-index:2;
color:rgba(0,0,0,255);
Expand All @@ -328,6 +208,24 @@ span {
top:22px;
font-size:18px;
}
#filterInputBackground {
z-index:1;
color:rgba(0,0,0,0);
position:absolute;
left:530px;
top:11px;
height:30px;
width:650px;
font-size:20px;
font-family:monospace;
background:white;
border:0px;
padding:0px;
padding-top:8px;
padding-left:2px;
}



#addMappingForm {
background:rgb(187,187,227);
Expand Down Expand Up @@ -431,33 +329,6 @@ span {



#signalsFile {
position:absolute;
padding:10px;
left:0px;
top:65px;
background:transparent;
color:black;
display:none;
}
#mappingsFile {
position:absolute;
padding:10px;
left:0px;
top:65px;
background:transparent;
color:black;
display:none;
}
#rawText {
position:absolute;
padding:10px;
left:0px;
top:100px;
background:transparent;
color:black;
display:none;
}
#globalCanvas{
left:0px;
top:0px;
Expand Down
20 changes: 3 additions & 17 deletions html/vizmapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@

<body>
<canvas id="globalCanvas"></canvas>
<p id="signalsFile">JSON file: http://arrangatta.appspot.com/data/testerNetwork.json</p>
<p id="mappingsFile">JSON file: http://arrangatta.appspot.com/data/testerMapping.json</p>
<pre id="rawText"></pre>

<p id="filterInputLabel">signal filter</p>
<input id="filterInput" value=""/>
<pre id="filterText"></pre>
<pre id="filterInputBackground"></pre>

<div id="graphTab" class="active">view</div>
<div id="listTab" class="inactive">edit</div>
<div id="rawTab" class="inactive">raw</div>
<div id="viewTab" class="active">view</div>
<div id="editTab" class="inactive">edit</div>

<div id="addMappingForm">
<p>connection from</p>
Expand Down Expand Up @@ -130,16 +127,5 @@
<p>one can group the matches of multiple filters together by sepearating multiple filter expressions with a space (" "). this acts functionally as a logical OR.</p>
<p><i>for example, the string "/ear/blob2 /eye /monitor" will filter the set of all signals through each of the 3 expressions and then display the results of each filter together.</i></p>
</div>
<div id="taggingHelp" class="topicHelp">
<p><b>tagging</b></p>
<br/><br/>
</div>

<div id="signalsTab" class="active">signals</div>
<div id="mappingsTab" class="inactive">mappings</div>

<!--<input id="executeInput"/>
<pre id="executeText"></pre>
<button id="executeButton">execute</button>-->
</body>
</html>
16 changes: 16 additions & 0 deletions js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,19 @@ function fullOffset(e)
width:e.offsetWidth,
height:e.offsetHeight};
}

// Return new array with duplicate values removed
Array.prototype.uniquePairs =
function() {
var a = [];
var l = this.length;
for(var i=0; i<l; i++) {
for(var j=i+1; j<l; j++) {
// If this[i] is found later in the array
if (this[i][0] === this[j][0] && this[i][1] === this[j][1])
j = ++i;
}
a.push(this[i]);
}
return a;
};
Loading

0 comments on commit d263201

Please sign in to comment.