Update app.py
Browse files
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 |
-
<
|
1127 |
-
const
|
1128 |
-
if (
|
1129 |
-
window.modelContainer =
|
1130 |
-
|
1131 |
} else {
|
1132 |
-
|
1133 |
-
}'>
|
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])
|