diff --git a/core/to_source_code.js b/core/to_source_code.js index 3822a3b6..85ea1499 100644 --- a/core/to_source_code.js +++ b/core/to_source_code.js @@ -40,6 +40,14 @@ function to_source_code({value, indent="", function_names=false, newObject_paths return value.to_source_code(new_args) } else if (value === window) { return "window" } //too many weird values in there and too slow so punt. + else if (window.Picture && Picture.is_mat(value)){ //we can't and probably shouldn't attempt to print out a readable mat here, + //so just print a string to let a user know what it is in the inspector + //without this, bad bug happens when inspecting Jobs that have taken a picture and + //put it in a user_data variable + let result = "Mat (picture) of: width: " + Picture.mat_width(value) + + " height: " + Picture.mat_height(value) + return result + } else if (typeof(value) == "object"){//beware if we didn't catch arrays above this would hit //assumes at this point we just have a lit obj. return to_source_code_lit_obj(arguments[0]) diff --git a/picture1.js b/picture1.js index 002d8769..f09e7ff8 100644 --- a/picture1.js +++ b/picture1.js @@ -427,10 +427,10 @@ var Picture = class Picture{ else if(typeof(video_id) == "string") { video_elt = value_of_path(video_id) if(video_elt == undefined){ - let vid_callback = function() { + let show_video_callback = function() { Picture.take_picture({video_id: video_id, width: width, height: height, callback: callback}) } - Picture.show_video({video_id: video_id, camera_id: camera_id, width: width, height: height, visible: false, callback: vid_callback}) + Picture.show_video({video_id: video_id, camera_id: camera_id, width: width, height: height, visible: false, callback: show_video_callback}) return //a video show window will pop up but the below code won't be able to return its mat. /*let the_html = '