Talk:How to manipulate Canvas elements
Jump to navigation
Jump to search
named arguments in examples ?
Hi there, fantastic job ! May I suggest that we use named function arguments, i.e. in the form:
var foo = func(altitude, label) {
}
foo(altitude:100, label:"hello world");
I feel that this would help make the code more self-explanatory, what do you think ? --Hooray (talk) 14:21, 5 December 2017 (EST)
plot2D namespace detection
I think, the following should work:
if (!canvas['plot2D']) {
var root = getprop("/sim/fg-root");
io.load_nasal( root ~ '/Nasal/plot2D.nas', "canvas" );
}