Skip to content

Commit ada635c

Browse files
committed
update group
1 parent e927752 commit ada635c

5 files changed

Lines changed: 31 additions & 15 deletions

File tree

ForInstalledPython/glow.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GlowScriptOffline/glowscript_libraries/glow.3.2.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GlowScriptOffline3.2.zip

-3.11 MB
Binary file not shown.

lib/glow/primitives.js

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -751,30 +751,46 @@
751751
subclass(group, box)
752752
group.prototype.__hasPosAtCenter = true
753753
group.prototype.__objects = []
754-
// group.prototype.__last_pos = null
755-
// group.prototype.__lastcolor = null
756754
property.declare( group.prototype, {
757755
objects: {
758756
get: function() { return this.__objects },
759757
set: function(value) {
760758
this.__objects.push(value)
761759
}
762760
},
763-
// visible: {
764-
// get: function() {return this.__visible},
765-
// set: function(value) {
766-
// this.__visible = value
767-
// for (let c=0; c<this.__objects.length; c++) {
768-
// this.__objects[c].visible = value
769-
// }
770-
// }
771-
// },
761+
visible: {
762+
get: function() {return this.__visible},
763+
set: function(value) {
764+
this.__visible = value
765+
for (let c=0; c<this.__objects.length; c++) {
766+
this.__objects[c].visible = value
767+
}
768+
}
769+
},
770+
up: {
771+
get: function() {return this.__up},
772+
set: function(value) {
773+
this.__up = value
774+
for (let c=0; c<this.__objects.length; c++) {
775+
this.__objects[c].up = value
776+
}
777+
}
778+
},
779+
color: {
780+
get: function() {return this.__color},
781+
set: function(value) {
782+
this.__color = value
783+
for (let c=0; c<this.__objects.length; c++) {
784+
this.__objects[c].color = value
785+
}
786+
}
787+
},
772788
__change: function() {
773789
for (let c=0; c<this.__objects.length; c++) {
774790
this.__objects[c].__change()
775791
}
776792
},
777-
axis_changed: function(oldaxis, newaxis){
793+
axis_changed: function(oldaxis, newaxis){ // called from vectors.js
778794
let ax = cross(oldaxis, newaxis)
779795
let ang = diff_angle(oldaxis, newaxis)
780796
this.rotate({angle:ang, axis:ax})

package/glow.3.2.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)