Skip to content

Commit 9ad66c1

Browse files
committed
Delete some unused code from the glowcomm files
1 parent a1607b6 commit 9ad66c1

File tree

2 files changed

+0
-82
lines changed

2 files changed

+0
-82
lines changed

labextension/vpython/src/glowcommlab.js

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -897,47 +897,6 @@ function handle_cmds(dcmds) {
897897
default:
898898
console.log("Unable to create object")
899899
}
900-
901-
/*
902-
if (obj === 'redisplay') {
903-
var c = document.getElementById(cmd.sceneId)
904-
if (c !== null) {
905-
var scn = "#" + cmd.sceneId
906-
glowObjs[idx].sceneclone = $(scn).clone(true,true)
907-
//document.getElementById('glowscript2').appendChild(c)
908-
//document.getElementById('glowscript2').replaceWith(c)
909-
$('#glowscript2').replaceWith(c)
910-
c = document.getElementById(cmd.sceneId)
911-
var cont = scn + " .glowscript"
912-
window.__context = { glowscript_container: $(cont) }
913-
} else {
914-
window.__context = { glowscript_container: $("#glowscript").removeAttr("id") }
915-
var newcnvs = canvas()
916-
for (var obj in glowObjs[idx].objects) {
917-
var o = glowObjs[idx].objects[obj]
918-
if ((o.constructor.name !== 'curve') && (o.constructor.name !== 'points')) {
919-
glowObjs[o.gidx] = o.clone({canvas: newcnvs})
920-
var olen = newcnvs.objects.length
921-
if (olen > 0) {
922-
newcnvs.objects[olen - 1].gidx = o.gidx
923-
}
924-
}
925-
}
926-
glowObjs[idx] = newcnvs
927-
$("#glowscript2").attr("id",cmd.sceneId)
928-
}
929-
} else if (obj === 'delete') {
930-
b = glowObjs[idx]
931-
if ((b !== null) || (b.visible !== undefined)) {
932-
b.visible = false
933-
}
934-
glowObjs[idx] = null
935-
} else if (obj === 'heartbeat') {
936-
//console.log("heartbeat")
937-
} else if (obj === 'debug') {
938-
console.log("debug : ", cmd)
939-
}
940-
*/
941900
} // end of cmds (constructors and special data)
942901
}
943902

vpython/vpython_libraries/glowcomm.js

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -857,47 +857,6 @@ function handle_cmds(dcmds) {
857857
default:
858858
console.log("Unable to create object")
859859
}
860-
861-
/*
862-
if (obj === 'redisplay') {
863-
var c = document.getElementById(cmd.sceneId)
864-
if (c !== null) {
865-
var scn = "#" + cmd.sceneId
866-
glowObjs[idx].sceneclone = $(scn).clone(true,true)
867-
//document.getElementById('glowscript2').appendChild(c)
868-
//document.getElementById('glowscript2').replaceWith(c)
869-
$('#glowscript2').replaceWith(c)
870-
c = document.getElementById(cmd.sceneId)
871-
var cont = scn + " .glowscript"
872-
window.__context = { glowscript_container: $(cont) }
873-
} else {
874-
window.__context = { glowscript_container: $("#glowscript").removeAttr("id") }
875-
var newcnvs = canvas()
876-
for (var obj in glowObjs[idx].objects) {
877-
var o = glowObjs[idx].objects[obj]
878-
if ((o.constructor.name !== 'curve') && (o.constructor.name !== 'points')) {
879-
glowObjs[o.gidx] = o.clone({canvas: newcnvs})
880-
var olen = newcnvs.objects.length
881-
if (olen > 0) {
882-
newcnvs.objects[olen - 1].gidx = o.gidx
883-
}
884-
}
885-
}
886-
glowObjs[idx] = newcnvs
887-
$("#glowscript2").attr("id",cmd.sceneId)
888-
}
889-
} else if (obj === 'delete') {
890-
b = glowObjs[idx]
891-
if ((b !== null) || (b.visible !== undefined)) {
892-
b.visible = false
893-
}
894-
glowObjs[idx] = null
895-
} else if (obj === 'heartbeat') {
896-
//console.log("heartbeat")
897-
} else if (obj === 'debug') {
898-
console.log("debug : ", cmd)
899-
}
900-
*/
901860
} // end of cmds (constructors and special data)
902861
}
903862

0 commit comments

Comments
 (0)