/*globals svgEditor, svgedit, svgCanvas, $*/ /*jslint vars: true, eqeq: true, todo: true*/ /* * ext-foreignobject.js * * Licensed under the Apache License, Version 2 * * Copyright(c) 2010 Jacques Distler * Copyright(c) 2010 Alexis Deveria * */ svgEditor.addExtension("foreignObject", function(S) { var NS = svgedit.NS, Utils = svgedit.utilities, svgcontent = S.svgcontent, addElem = S.addSvgElementFromJson, selElems, editingforeign = false, svgdoc = S.svgroot.parentNode.ownerDocument, started, newFO; var properlySourceSizeTextArea = function () { // TODO: remove magic numbers here and get values from CSS var height = $('#svg_source_container').height() - 80; $('#svg_source_textarea').css('height', height); }; function showPanel(on) { var fc_rules = $('#fc_rules'); if(!fc_rules.length) { fc_rules = $('