Skip to content

Commit ec6d55a

Browse files
author
Kevin Nadro
committed
more updates
- renaming of files - highlighting of the text - clear modules so it doesn’t make more than the 2
1 parent 5463e43 commit ec6d55a

File tree

8 files changed

+63
-24
lines changed

8 files changed

+63
-24
lines changed

algorithm/category.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
},
7171
"sandbox": {
7272
"list": {
73-
"sandbox": "Sand Box"
73+
"2DMatrix": "2D Matrix"
7474
},
7575
"name": "Sandbox"
7676
},

algorithm/sandbox/2DMatrix/desc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"2DMatrix": "2DMatrix for drag and drop tracers!",
3+
"References": [
4+
],
5+
"files": {
6+
"normal": "2D Matrix"
7+
}
8+
}

algorithm/sandbox/sandbox/desc.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

css/stylesheet.css

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,20 @@ input[type=number]::-webkit-outer-spin-button {
675675
}
676676

677677
.inputField{
678-
width: 16px;
678+
width: 25px;
679679
border: 0;
680680
}
681+
682+
.sb-button{
683+
border: 1px solid #515151;
684+
}
685+
686+
.inputContainer{
687+
position: relative;
688+
width: 100%;
689+
}
690+
691+
.inputs{
692+
position: relative;
693+
display: block;
694+
}

index.html

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,24 +129,26 @@ <h3>
129129
</div>
130130
<div class="sandbox_container">
131131
<div>
132-
<div>
133-
# of Rows:
134-
<input id="numRows" type="number" value="5">
135-
</div>
132+
<div class="inputContainer">
133+
<div>
134+
# of Rows:
135+
<input class="inputs"id="numRows" type="number" value="5">
136+
</div>
136137

137-
<div>
138-
# of Columns:
139-
<input id="numColumns" type="number" value="5">
140-
</div>
138+
<div>
139+
# of Columns:
140+
<input class="inputs"id="numColumns" type="number" value="5">
141+
</div>
141142

142-
<div>
143-
Tracer Name:
144-
<input id="tracerName" type="text" value="default">
143+
<div>
144+
Tracer Name:
145+
<input class="inputs"id="tracerName" type="text" value="default">
146+
</div>
145147
</div>
146148

147149
<div>
148-
<button id="button-2DMatrix">Create 2DMatrix</button>
149-
<button id="button-generateJS">Generate Javascript</button>
150+
<button class='sb-button' id="button-2DMatrix">Create 2DMatrix</button>
151+
<button class='sb-button' id="button-generateJS">Generate Javascript</button>
150152
</div>
151153
</div>
152154
</div>

js/create/index.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,35 @@ const positionModules = () =>{
102102
}
103103
}
104104

105+
const clearModules = () =>{
106+
var elems = document.getElementsByClassName('module_wrapper');
107+
if(elems.length > 0){
108+
var parent = elems[0].parentElement;
109+
var numChild = parent.childNodes.length;
110+
for(var i = 0; i < numChild; i++){
111+
parent.removeChild(parent.firstChild);
112+
}
113+
}
114+
}
115+
116+
const enabledHightlighting = () =>{
117+
var elems = document.getElementsByClassName('module_wrapper');
118+
var logger = elems[1];
119+
var wrapper = logger.childNodes[1];
120+
console.log(elems);
121+
console.log(wrapper);
122+
for (var i = 0; i < wrapper.childNodes.length; i++) {
123+
wrapper.childNodes[i].style["-webkit-user-select"] = "all";
124+
}
125+
}
126+
105127
const setupButtons = () => {
106128

107129
var button_2DMatrix = document.getElementById("button-2DMatrix");
108130
var logger;
109131
var arr2DTracer;
110132
button_2DMatrix.addEventListener('click',function(){
133+
clearModules();
111134
arr2DTracer = new modules.Array2DTracer();
112135
logger = new modules.LogTracer('Generated Javascript');
113136

@@ -123,6 +146,7 @@ const setupButtons = () => {
123146
var button_JS = document.getElementById('button-generateJS');
124147
button_JS.addEventListener('click',function(){
125148
generateJS(logger);
149+
enabledHightlighting();
126150
},false);
127151

128152
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy