Update app.py
Browse files
app.py
CHANGED
@@ -623,6 +623,7 @@ 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 |
var coords = JSON.parse(document.getElementById("coords").getElementsByTagName("textarea")[0].value);
|
627 |
|
628 |
if (o.indexOf(""+n) < 0) {
|
@@ -1122,6 +1123,20 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
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'><div id='compass'><b style='color:blue;'>◅</b>𝍠<b style='color:red;'>▻</b></div></div>
|
1126 |
""")
|
1127 |
render = gr.Button("Render")
|
|
|
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 |
<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.style.width != \"100vw\") {
|
1129 |
+
model.style.width = \"100vw\";
|
1130 |
+
model.style.height = \"100vh\";
|
1131 |
+
model.style.position = \"fixed\";
|
1132 |
+
} else {
|
1133 |
+
model.style.width = \"initial\";
|
1134 |
+
model.style.height = \"initial\";
|
1135 |
+
model.style.position = \"initial\";
|
1136 |
+
}
|
1137 |
+
if (BABYLON) {
|
1138 |
+
BABYLON.Engine.resize();
|
1139 |
+
}'>[+]</a><br/>
|
1140 |
<div id='compass_box'><div id='compass'><b style='color:blue;'>◅</b>𝍠<b style='color:red;'>▻</b></div></div>
|
1141 |
""")
|
1142 |
render = gr.Button("Render")
|