Skip to content

Commit b93a422

Browse files
committed
Fix bug in re-enabling a menu
1 parent 63ba9a7 commit b93a422

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

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.2.7.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.

GlowScriptOffline2.7.zip

-2 Bytes
Binary file not shown.

lib/glow/primitives.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2999,9 +2999,10 @@
29992999
}
30003000

30013001
function menu(args) {
3002-
if (!(this instanceof menu)) return new menu(args) // so slider() is like new slider()
3002+
if (!(this instanceof menu)) return new menu(args) // so menu() is like new menu()
30033003
var cvs = canvas.get_selected()
3004-
var attrs = {pos:cvs.caption_anchor, selected:null, disabled:false} // selected = -1 means no choice is highlighted initially
3004+
// selected = -1 means no choice is highlighted initially:
3005+
var attrs = {pos:cvs.caption_anchor, selected:null, disabled:false}
30053006
if (args.bind !== undefined) {
30063007
attrs.bind = args.bind
30073008
delete args.bind
@@ -3035,9 +3036,9 @@
30353036
attrs.disabled = value
30363037
$(attrs.jmenu).attr('disabled', attrs.disabled)
30373038
if (attrs.disabled)
3038-
$(attrs.jmenu).css({color:rgb_to_css(vec(0.7,0.7,0.7)), backgroundColor:rgb_to_css(vec(1,1,1))})
3039+
$(attrs.jmenu).css({color:rgb_to_css(vec(0.7,0.7,0.7))})
30393040
else
3040-
$(attrs.jmenu).css({color:rgb_to_css(attrs.color), backgroundColor:rgb_to_css(attrs.background)})
3041+
$(attrs.jmenu).css({color:rgb_to_css(vec(0,0,0))})
30413042
},
30423043
get selected() {return $(attrs.jmenu).val()},
30433044
set selected(value) {$(attrs.jmenu).val(value)},

package/glow.2.7.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)