freealise commited on
Commit
890c4f1
·
verified ·
1 Parent(s): 23123cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -623,7 +623,6 @@ async(c, o, p, d, n, m)=>{
623
  document.getElementById("model3D").getElementsByTagName("canvas")[0].ondrag = function(e){e.preventDefault();}
624
 
625
  document.getElementById("model3D").appendChild(document.getElementById("compass_box"));
626
- document.getElementById("model3D").appendChild(document.getElementById("fullscreen"));
627
  var coords = JSON.parse(document.getElementById("coords").getElementsByTagName("textarea")[0].value);
628
 
629
  if (o.indexOf(""+n) < 0) {
@@ -1123,15 +1122,14 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
1123
  <a onclick='snapshot();'>Screenshot</a><br/>
1124
  <img src='' id='img_out' onload='var ctxt = document.getElementById(\"cnv_out\").getContext(\"2d\");ctxt.drawImage(this, 0, 0);'/><br/>
1125
  <canvas id='cnv_out'></canvas>
1126
- <a href='#' id='fullscreen' onclick='
1127
- const model = document.getElementById(\"model3D\");
1128
- if (model.parentNode != document.body) {
1129
- window.modelContainer = model.parentNode;
1130
- model.parentNode = document.body;
1131
  } else {
1132
- model.parentNode = window.modelContainer;
1133
- }'>[+]</a><br/>
1134
- <div id='compass_box'><div id='compass'><b style='color:blue;'>◅</b>𝍠<b style='color:red;'>▻</b></div></div>
1135
  """)
1136
  render = gr.Button("Render")
1137
  input_json.input(show_json, inputs=[input_json], outputs=[processed_video, processed_zip, output_frame, output_mask, output_depth, coords])
 
623
  document.getElementById("model3D").getElementsByTagName("canvas")[0].ondrag = function(e){e.preventDefault();}
624
 
625
  document.getElementById("model3D").appendChild(document.getElementById("compass_box"));
 
626
  var coords = JSON.parse(document.getElementById("coords").getElementsByTagName("textarea")[0].value);
627
 
628
  if (o.indexOf(""+n) < 0) {
 
1122
  <a onclick='snapshot();'>Screenshot</a><br/>
1123
  <img src='' id='img_out' onload='var ctxt = document.getElementById(\"cnv_out\").getContext(\"2d\");ctxt.drawImage(this, 0, 0);'/><br/>
1124
  <canvas id='cnv_out'></canvas>
1125
+ <div id='compass_box' onclick='
1126
+ const model3D = document.getElementById(\"model3D\");
1127
+ if (model3D.parentNode != document.body) {
1128
+ window.modelContainer = model3D.parentNode;
1129
+ model3D.parentNode = document.body;
1130
  } else {
1131
+ model3D.parentNode = window.modelContainer;
1132
+ }'><div id='compass'><b style='color:blue;'>◅</b>𝍠<b style='color:red;'>▻</b></div></div>
 
1133
  """)
1134
  render = gr.Button("Render")
1135
  input_json.input(show_json, inputs=[input_json], outputs=[processed_video, processed_zip, output_frame, output_mask, output_depth, coords])