--- a/stlviewer.js Thu Apr 06 15:41:04 2017 +0200 +++ b/stlviewer.js Thu Apr 06 16:21:21 2017 +0200 @@ -32,6 +32,27 @@ for (i =0; i<10; i++) clear_scene(); }); update_scene(); + + $("#image2d").click(function() { + var img = $("#image2d").clone(); + //img.css('width', '100%'); + img.css('margin', '0 auto'); + $("<div>") + .append(img) + .dialog({ + modal: true, + draggable: false, + resizable: false, + title: "2D Layout view", + height: window.innerHeight, + width: window.innerWidth, + buttons: { + Close: function() { + $( this ).dialog( "close" ); + } + } + }); + }); } ); function clear_scene() { @@ -98,6 +119,8 @@ $("#infocontainer").html(content); + $("#image2d").attr('src', 'data:image/png;base64,' + data.image); + } }); }