diff --git a/editor/extensions/ext-polygon.js b/editor/extensions/ext-polygon.js new file mode 100644 index 00000000..64844a77 --- /dev/null +++ b/editor/extensions/ext-polygon.js @@ -0,0 +1,233 @@ +/* + * ext-polygon.js + * + * + * Copyright(c) 2010 CloudCanvas, Inc. + * All rights reserved + * + */ +svgEditor.addExtension("polygon", function(S){ + + var svgcontent = S.svgcontent, addElem = S.addSvgElementFromJson, selElems, svgns = "http://www.w3.org/2000/svg", xlinkns = "http://www.w3.org/1999/xlink", xmlns = "http://www.w3.org/XML/1998/namespace", xmlnsns = "http://www.w3.org/2000/xmlns/", se_ns = "http://svg-edit.googlecode.com", htmlns = "http://www.w3.org/1999/xhtml", editingitex = false, svgdoc = S.svgroot.parentNode.ownerDocument, started, newFO, edg = 0, newFOG, newFOGParent, newDef, newImageName, newMaskID, undoCommand = "Not image", modeChangeG; + + var ccZoom; + var wEl, hEl; + var wOffset, hOffset; + var ccRBG, ccRgbEl; + var ccOpacity; + var brushW, brushH, shape; + + var ccDebug = document.getElementById('debugpanel'); + + + /* 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 = $('