Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update_vector_field
  • Loading branch information
exh12001 committed Nov 22, 2017
1 parent 229d350 commit 4d7f47a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions js/mobius.js
Expand Up @@ -52,7 +52,7 @@ function add_2d_ctrl(parent,variable,label,min_x,max_x,min_y,max_y) {
parent.append(value);
}

function add_vector_field(parent){
function add_vector_field(){
var canvas = document.createElement('canvas');
canvas.style.border = "1px solid";
canvas.id = 'canvas'
Expand All @@ -62,7 +62,7 @@ function add_vector_field(parent){

height = canvas.height;
width = canvas.width;
parent.append(canvas);
return canvas;
}

//update based on id
Expand Down Expand Up @@ -150,6 +150,8 @@ $(function () {//document is ready, setup everything
add_2d_ctrl($(guibox),c,"c",-1,1,-1,1);
add_2d_ctrl($(guibox),d,"d",-1,1,-1,1);

add_vector_field($(guibox));

canvas = add_vector_field()
document.body.appendChild(canvas);

});
1 change: 0 additions & 1 deletion style/style.css
Expand Up @@ -20,6 +20,5 @@ body{
}
#gui-box{
display: inline-block;
position: absolute;
top: 0;
}

0 comments on commit 4d7f47a

Please sign in to comment.