Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal resizer #26

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions visualizer.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,29 @@
}
#bottom {
width:100vw;
flex-grow:1;
display:flex;
flex-flow: row;
}
#visualizer {
width:50vw;
width:100%;
position:relative;
flex-flow: column;
overflow: hidden;
}
#show {
width: 100%;
height: 100%;
position:absolute;
}
#editor {
flex-grow:1;
flex-basis:20vw;
width: 50%;
display:flex;
flex-flow: column;
}



#editor-text {
width:100%;
flex-grow:1;
}

button, #fileLabel {
Expand Down Expand Up @@ -141,9 +142,8 @@
}

#codeWrapper {
flex-grow:1;
flex-basis:20vw;
max-width:30em;
min-width: 25em;
display:block;
margin:0;
position:relative;
Expand All @@ -159,6 +159,8 @@
display:flex;
flex-flow: column;
}


.lineNumber {
color: #888;
width: 2.5em;
Expand All @@ -172,7 +174,13 @@
width: 100%;
box-sizing: border-box;
}

.resizable {
resize: horizontal;
overflow: auto;
border: 1px solid;
display: inline-flex;
height: 96vh;
}
</style>
<body>
<div id="top">
Expand All @@ -188,9 +196,7 @@
</div>

<div id="bottom">


<div id="editor">
<div id="editor" class="resizable">
<div id="editor-text">
//import the knitout writer code and instantiate it as an object
const knitout = require('knitout');
Expand All @@ -203,10 +209,10 @@

k.inhook(Carrier);
for(var i=3;i&gt;=0;i -= 2){
k.tuck("-","f"+i,Carrier);
k.tuck("-","f"+i,Carrier);
}
for(var i=0;i&lt;=3;i += 2){
k.tuck("+","f"+i,Carrier);
k.tuck("+","f"+i,Carrier);
}

for(var i=3;i&gt;=0;i--){
Expand All @@ -227,10 +233,10 @@
k.xfer("fs2", "b2");

for(var i=0;i&lt;2;i++){
k.knit("+","b0",Carrier);
k.knit("+","b2",Carrier);
k.knit("-","f3",Carrier);
k.knit("-","f1",Carrier);
k.knit("+","b0",Carrier);
k.knit("+","b2",Carrier);
k.knit("-","f3",Carrier);
k.knit("-","f1",Carrier);
}

k.outhook(Carrier);
Expand Down