{I" class:ETI"ProcessedAsset;FI"logical_path;TI"method_draw_embed.js;FI" pathname;TI"`/Users/jeff/workspace/windmill_labs/method-draw/app/assets/javascripts/method_draw_embed.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+,8ƒTI" length;TiÄI" digest;TI"%51abceefe4047a05b8489237ef50fb86;FI" source;TI"Ä var svgCanvas = svgCanvas || {}; function submitHandler(event) { var id = event.data; svgCanvas[id].getSvgString()(function (data, error) { handleSvgData(data, error, id); }); event.preventDefault(); event.stopImmediatePropagation(); } function attachSubmitHandler(event) { var id = event.data; $("input#" + id).closest("form").on("submit.svgedit_" + id, null, id, submitHandler); } function handleSvgData(data, error, id) { if (error) { alert('Error: ' + error); } else { var input = $("input#" + id); var form = input.closest("form"); input.attr("value", method_draw_encode64("\n" + data)); form.off("submit.svgedit_" + id); form.one("submit.svgedit_" + id, null, id, attachSubmitHandler); form.submit(); } } function initEmbed(id, value, hide_menu, hide_image_tool, url) { var frame = document.getElementById("svgedit_" + id); svgCanvas[id] = new embedded_svg_edit(frame); var doc = frame.contentDocument; if (!doc) { doc = frame.contentWindow.document; } if (hide_menu) { var mainButton = doc.getElementById('main_button'); mainButton.parentNode.removeChild(mainButton); var toolsTop = doc.getElementById('tools_top'); toolsTop.style.left = '5px'; } if (hide_image_tool) { var imageTool = doc.getElementById('tool_image'); imageTool.parentNode.removeChild(imageTool); } if (!url) { svgCanvas[id].setSvgString(method_draw_decode64(value)); } $("input#" + id).closest("form").on("submit.svgedit_" + id, null, id, submitHandler); $("#svgedit_" + id).css('visibility', ''); } function attachLoadHandler(id, value, hide_menu, hide_image_tool, url) { var frame = $("#svgedit_" + id); if (frame.attr('src')) { frame.load(function () { initEmbed(id, value, hide_menu, hide_image_tool, url); }); } else { setTimeout(function () { attachLoadHandler(id, value, hide_menu, hide_image_tool, url); }, 0); } } ; ;TI"dependency_digest;TI"%412848b280cf2b1c895e868f16a37ff6;FI"required_paths;T[I"m/Users/jeff/workspace/windmill_labs/method-draw/vendor/assets/javascripts/method-draw-js/src/embedapi.js;FI"a/Users/jeff/workspace/windmill_labs/method-draw/app/assets/javascripts/method_draw/base64.js;FI"`/Users/jeff/workspace/windmill_labs/method-draw/app/assets/javascripts/method_draw_embed.js;FI"dependency_paths;T[{I" path;TI"`/Users/jeff/workspace/windmill_labs/method-draw/app/assets/javascripts/method_draw_embed.js;FI" mtime;TI"2014-12-06T12:09:00-05:00;TI" digest;TI"%18d71cde440ef1aa378c3aacbf0ff898;F{@I"m/Users/jeff/workspace/windmill_labs/method-draw/vendor/assets/javascripts/method-draw-js/src/embedapi.js;F@!I"2014-12-06T12:00:25-05:00;T@#I"%c5bee047494248473abb53f63cd2eb77;F{@I"a/Users/jeff/workspace/windmill_labs/method-draw/app/assets/javascripts/method_draw/base64.js;F@!I"2014-12-06T11:35:04-05:00;T@#I"%4de4b3470f6e34b6b83dcbd2f7b5d76b;FI" _version;TI"%e4fae582d35919173aa703e1ae9b242e;F