Unverified Commit a5fb4ede authored by Lokhin Cheng's avatar Lokhin Cheng Committed by Jeffrey I. Schiller

Add Comments to Block Save Images

Fixed the issue where text in comment blocks disappears when the user
downloads blocks as images

Change-Id: I00339e03fda72d3b563631b536e6391ee05332b5
parent f959b72c
......@@ -68,8 +68,16 @@ function styles(el, selectorRemap) {
out$.svgAsDataUri = function(el, optmetrics, options, cb) {
options = options || {};
options.scale = options.scale || 1;
var xmlns = "http://www.w3.org/2000/xmlns/";
var xmlns = "http://www.w3.org/2000/xmlns/";
var outer = document.createElement("div");
var textAreas = document.getElementsByTagName("textarea");
for (var i = 0; i < textAreas.length; i++)
{
textAreas[i].innerHTML = textAreas[i].value;
}
var clone = el.cloneNode(true);
var width, height;
if(el.tagName == 'svg') {
......@@ -181,4 +189,4 @@ out$.saveSvgAsPng = function(el, name, optmetrics, options) {
Blockly.ExportBlocksImage.onclickExportBlocks = function(metrics) {
context : this;
saveSvgAsPng(document.getElementById("blockly_Svg"), "blocks.png", metrics);
}
\ No newline at end of file
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment