Removed code for Opera/Win/Non-en bugs that were fixed in Opera 10.50. More code reorganization
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1615 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
6a14ae5e86
commit
63407c7542
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -59,6 +59,36 @@ var indexSectionsWithContent = {
|
|||
"Y": false,
|
||||
"Z": false
|
||||
},
|
||||
"Interfaces": {
|
||||
"Symbols": false,
|
||||
"Numbers": false,
|
||||
"A": false,
|
||||
"B": false,
|
||||
"C": false,
|
||||
"D": false,
|
||||
"E": false,
|
||||
"F": false,
|
||||
"G": false,
|
||||
"H": false,
|
||||
"I": false,
|
||||
"J": false,
|
||||
"K": false,
|
||||
"L": false,
|
||||
"M": false,
|
||||
"N": false,
|
||||
"O": false,
|
||||
"P": false,
|
||||
"Q": false,
|
||||
"R": false,
|
||||
"S": true,
|
||||
"T": false,
|
||||
"U": false,
|
||||
"V": false,
|
||||
"W": false,
|
||||
"X": false,
|
||||
"Y": false,
|
||||
"Z": false
|
||||
},
|
||||
"Classes": {
|
||||
"Symbols": false,
|
||||
"Numbers": false,
|
||||
|
|
|
@ -11,7 +11,7 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
|
|||
|
||||
|
||||
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_addCommandToHistory><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.addCommandToHistory" target=_parent class=ISymbol>addCommandToHistory</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_addSubCommand><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.BatchCommand.addSubCommand" target=_parent class=ISymbol>addSubCommand</a>, <span class=IParent>SvgCanvas.<wbr>BatchCommand</span></div></div><div class=SRResult id=SR_addToSelection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.addToSelection" target=_parent class=ISymbol>addToSelection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_apply><div class=IEntry><a href="javascript:searchResults.Toggle('SR_apply')" class=ISymbol>apply</a><div class=ISubIndex><a href="../files/svgcanvas-js.html#SvgCanvas.BatchCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>BatchCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.ChangeElementCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>ChangeElementCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.InsertElementCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>InsertElementCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.RemoveElementCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>RemoveElementCommand</a></div></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_addCommandToHistory><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.addCommandToHistory" target=_parent class=ISymbol>addCommandToHistory</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_addSubCommand><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.BatchCommand.addSubCommand" target=_parent class=ISymbol>addSubCommand</a>, <span class=IParent>SvgCanvas.<wbr>BatchCommand</span></div></div><div class=SRResult id=SR_addSvgElementFromJson><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.addSvgElementFromJson" target=_parent class=ISymbol>addSvgElementFromJson</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_addToSelection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.addToSelection" target=_parent class=ISymbol>addToSelection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_apply><div class=IEntry><a href="javascript:searchResults.Toggle('SR_apply')" class=ISymbol>apply</a><div class=ISubIndex><a href="../files/svgcanvas-js.html#SvgCanvas.BatchCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>BatchCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.ChangeElementCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>ChangeElementCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.InsertElementCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>InsertElementCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.RemoveElementCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>RemoveElementCommand</a></div></div></div><div class=SRResult id=SR_assignAttributes><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.assignAttributes" target=_parent class=ISymbol>assignAttributes</a>, <span class=IParent>SelectorManager</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults", "HTML");
|
||||
|
|
|
@ -11,7 +11,7 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
|
|||
|
||||
|
||||
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_ChangeElementCommand><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.ChangeElementCommand" target=_parent class=ISymbol>ChangeElementCommand</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_clear><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.clear" target=_parent class=ISymbol>clear</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_clearSelection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.clearSelection" target=_parent class=ISymbol>clearSelection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_createLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.createLayer" target=_parent class=ISymbol>createLayer</a>, <span class=IParent>SelectorManager</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_ChangeElementCommand><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.ChangeElementCommand" target=_parent class=ISymbol>ChangeElementCommand</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_cleanupElement><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.cleanupElement" target=_parent class=ISymbol>cleanupElement</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_clear><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.clear" target=_parent class=ISymbol>clear</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_clearSelection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.clearSelection" target=_parent class=ISymbol>clearSelection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_convertToNum><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.convertToNum" target=_parent class=ISymbol>convertToNum</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_createLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.createLayer" target=_parent class=ISymbol>createLayer</a>, <span class=IParent>SelectorManager</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults", "HTML");
|
||||
|
|
|
@ -11,7 +11,7 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
|
|||
|
||||
|
||||
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_getCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getCurrentLayer" target=_parent class=ISymbol>getCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getLayer" target=_parent class=ISymbol>getLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getLayerOpacity><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getLayerOpacity" target=_parent class=ISymbol>getLayerOpacity</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getLayerVisibility><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getLayerVisibility" target=_parent class=ISymbol>getLayerVisibility</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getNextRedoCommandText><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getNextRedoCommandText" target=_parent class=ISymbol>getNextRedoCommandText</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getNextUndoCommandText><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getNextUndoCommandText" target=_parent class=ISymbol>getNextUndoCommandText</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getNumLayers><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getNumLayers" target=_parent class=ISymbol>getNumLayers</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getRedoStackSize><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getRedoStackSize" target=_parent class=ISymbol>getRedoStackSize</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getRubberBandBox><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.SelectorManager.getRubberBandBox" target=_parent class=ISymbol>getRubberBandBox</a>, <span class=IParent>SelectorManager.<wbr>SelectorManager</span></div></div><div class=SRResult id=SR_getSvgString><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getSvgString" target=_parent class=ISymbol>getSvgString</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getUndoStackSize><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getUndoStackSize" target=_parent class=ISymbol>getUndoStackSize</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getVersion><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getVersion" target=_parent class=ISymbol>getVersion</a>, <span class=IParent>SelectorManager</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_getCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getCurrentLayer" target=_parent class=ISymbol>getCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getId><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getId" target=_parent class=ISymbol>getId</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getLayer" target=_parent class=ISymbol>getLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getLayerOpacity><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getLayerOpacity" target=_parent class=ISymbol>getLayerOpacity</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getLayerVisibility><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getLayerVisibility" target=_parent class=ISymbol>getLayerVisibility</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getNextId><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getNextId" target=_parent class=ISymbol>getNextId</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getNextRedoCommandText><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getNextRedoCommandText" target=_parent class=ISymbol>getNextRedoCommandText</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getNextUndoCommandText><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getNextUndoCommandText" target=_parent class=ISymbol>getNextUndoCommandText</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getNumLayers><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getNumLayers" target=_parent class=ISymbol>getNumLayers</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getRedoStackSize><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getRedoStackSize" target=_parent class=ISymbol>getRedoStackSize</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getRubberBandBox><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.SelectorManager.getRubberBandBox" target=_parent class=ISymbol>getRubberBandBox</a>, <span class=IParent>SelectorManager.<wbr>SelectorManager</span></div></div><div class=SRResult id=SR_getSvgString><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getSvgString" target=_parent class=ISymbol>getSvgString</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getUndoStackSize><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getUndoStackSize" target=_parent class=ISymbol>getUndoStackSize</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getUrlFromAttr><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getUrlFromAttr" target=_parent class=ISymbol>getUrlFromAttr</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getVersion><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getVersion" target=_parent class=ISymbol>getVersion</a>, <span class=IParent>SelectorManager</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults", "HTML");
|
||||
|
|
|
@ -11,7 +11,7 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
|
|||
|
||||
|
||||
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_redo><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.redo" target=_parent class=ISymbol>redo</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_releaseSelector><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.SelectorManager.releaseSelector" target=_parent class=ISymbol>releaseSelector</a>, <span class=IParent>SelectorManager.<wbr>SelectorManager</span></div></div><div class=SRResult id=SR_RemoveElementCommand><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.RemoveElementCommand" target=_parent class=ISymbol>RemoveElementCommand</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_removeFromSelection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.removeFromSelection" target=_parent class=ISymbol>removeFromSelection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_renameCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.renameCurrentLayer" target=_parent class=ISymbol>renameCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_requestSelector><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.SelectorManager.requestSelector" target=_parent class=ISymbol>requestSelector</a>, <span class=IParent>SelectorManager.<wbr>SelectorManager</span></div></div><div class=SRResult id=SR_reset><div class=IEntry><a href="../files/svgcanvas-js.html#Selector.Selector.reset" target=_parent class=ISymbol>reset</a>, <span class=IParent>Selector.<wbr>Selector</span></div></div><div class=SRResult id=SR_resetUndoStack><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.resetUndoStack" target=_parent class=ISymbol>resetUndoStack</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_resize><div class=IEntry><a href="../files/svgcanvas-js.html#Selector.Selector.resize" target=_parent class=ISymbol>resize</a>, <span class=IParent>Selector.<wbr>Selector</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_redo><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.redo" target=_parent class=ISymbol>redo</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_releaseSelector><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.SelectorManager.releaseSelector" target=_parent class=ISymbol>releaseSelector</a>, <span class=IParent>SelectorManager.<wbr>SelectorManager</span></div></div><div class=SRResult id=SR_RemoveElementCommand><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.RemoveElementCommand" target=_parent class=ISymbol>RemoveElementCommand</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_removeFromSelection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.removeFromSelection" target=_parent class=ISymbol>removeFromSelection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_removeUnusedDefElems><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.removeUnusedDefElems" target=_parent class=ISymbol>removeUnusedDefElems</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_renameCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.renameCurrentLayer" target=_parent class=ISymbol>renameCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_requestSelector><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.SelectorManager.requestSelector" target=_parent class=ISymbol>requestSelector</a>, <span class=IParent>SelectorManager.<wbr>SelectorManager</span></div></div><div class=SRResult id=SR_reset><div class=IEntry><a href="../files/svgcanvas-js.html#Selector.Selector.reset" target=_parent class=ISymbol>reset</a>, <span class=IParent>Selector.<wbr>Selector</span></div></div><div class=SRResult id=SR_resetUndoStack><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.resetUndoStack" target=_parent class=ISymbol>resetUndoStack</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_resize><div class=IEntry><a href="../files/svgcanvas-js.html#Selector.Selector.resize" target=_parent class=ISymbol>resize</a>, <span class=IParent>Selector.<wbr>Selector</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults", "HTML");
|
||||
|
|
|
@ -11,7 +11,7 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
|
|||
|
||||
|
||||
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_save><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.save" target=_parent class=ISymbol>save</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_selectAllInCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.selectAllInCurrentLayer" target=_parent class=ISymbol>selectAllInCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setCurrentLayer" target=_parent class=ISymbol>setCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setCurrentLayerPosition><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setCurrentLayerPosition" target=_parent class=ISymbol>setCurrentLayerPosition</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setForeignString_lpaxmlString_comelt_rpa><div class=IEntry><a href="../files/extensions/ext-foreignobject-js.html#setForeignString(xmlString,elt)" target=_parent class=ISymbol>setForeignString(xmlString,elt)</a></div></div><div class=SRResult id=SR_setLayerOpacity><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setLayerOpacity" target=_parent class=ISymbol>setLayerOpacity</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setLayerVisibility><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setLayerVisibility" target=_parent class=ISymbol>setLayerVisibility</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setSvgString><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setSvgString" target=_parent class=ISymbol>setSvgString</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_showGrips><div class=IEntry><a href="../files/svgcanvas-js.html#Selector.Selector.showGrips" target=_parent class=ISymbol>showGrips</a>, <span class=IParent>Selector.<wbr>Selector</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_sanitizeSvg><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.sanitizeSvg" target=_parent class=ISymbol>sanitizeSvg</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_save><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.save" target=_parent class=ISymbol>save</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_selectAllInCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.selectAllInCurrentLayer" target=_parent class=ISymbol>selectAllInCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setCurrentLayer" target=_parent class=ISymbol>setCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setCurrentLayerPosition><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setCurrentLayerPosition" target=_parent class=ISymbol>setCurrentLayerPosition</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setForeignString_lpaxmlString_comelt_rpa><div class=IEntry><a href="../files/extensions/ext-foreignobject-js.html#setForeignString(xmlString,elt)" target=_parent class=ISymbol>setForeignString(xmlString,elt)</a></div></div><div class=SRResult id=SR_setIdPrefix><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setIdPrefix" target=_parent class=ISymbol>setIdPrefix</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setLayerOpacity><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setLayerOpacity" target=_parent class=ISymbol>setLayerOpacity</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setLayerVisibility><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setLayerVisibility" target=_parent class=ISymbol>setLayerVisibility</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setSvgString><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setSvgString" target=_parent class=ISymbol>setSvgString</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setUnitAttr><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.setUnitAttr" target=_parent class=ISymbol>setUnitAttr</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_showGrips><div class=IEntry><a href="../files/svgcanvas-js.html#Selector.Selector.showGrips" target=_parent class=ISymbol>showGrips</a>, <span class=IParent>Selector.<wbr>Selector</span></div></div><div class=SRResult id=SR_svgCanvasToString><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.svgCanvasToString" target=_parent class=ISymbol>svgCanvasToString</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_svgToString><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.svgToString" target=_parent class=ISymbol>svgToString</a>, <span class=IParent>SelectorManager</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults", "HTML");
|
||||
|
|
|
@ -11,7 +11,7 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
|
|||
|
||||
|
||||
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_addCommandToHistory><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.addCommandToHistory" target=_parent class=ISymbol>addCommandToHistory</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_addSubCommand><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.BatchCommand.addSubCommand" target=_parent class=ISymbol>addSubCommand</a>, <span class=IParent>SvgCanvas.<wbr>BatchCommand</span></div></div><div class=SRResult id=SR_addToSelection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.addToSelection" target=_parent class=ISymbol>addToSelection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_apply><div class=IEntry><a href="javascript:searchResults.Toggle('SR_apply')" class=ISymbol>apply</a><div class=ISubIndex><a href="../files/svgcanvas-js.html#SvgCanvas.BatchCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>BatchCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.ChangeElementCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>ChangeElementCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.InsertElementCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>InsertElementCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.RemoveElementCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>RemoveElementCommand</a></div></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_addCommandToHistory><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.addCommandToHistory" target=_parent class=ISymbol>addCommandToHistory</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_addSubCommand><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.BatchCommand.addSubCommand" target=_parent class=ISymbol>addSubCommand</a>, <span class=IParent>SvgCanvas.<wbr>BatchCommand</span></div></div><div class=SRResult id=SR_addSvgElementFromJson><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.addSvgElementFromJson" target=_parent class=ISymbol>addSvgElementFromJson</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_addToSelection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.addToSelection" target=_parent class=ISymbol>addToSelection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_apply><div class=IEntry><a href="javascript:searchResults.Toggle('SR_apply')" class=ISymbol>apply</a><div class=ISubIndex><a href="../files/svgcanvas-js.html#SvgCanvas.BatchCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>BatchCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.ChangeElementCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>ChangeElementCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.InsertElementCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>InsertElementCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.RemoveElementCommand.apply" target=_parent class=IParent>SvgCanvas.<wbr>RemoveElementCommand</a></div></div></div><div class=SRResult id=SR_assignAttributes><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.assignAttributes" target=_parent class=ISymbol>assignAttributes</a>, <span class=IParent>SelectorManager</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults", "HTML");
|
||||
|
|
|
@ -11,7 +11,7 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
|
|||
|
||||
|
||||
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_ChangeElementCommand><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.ChangeElementCommand" target=_parent class=ISymbol>ChangeElementCommand</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_clear><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.clear" target=_parent class=ISymbol>clear</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_clearSelection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.clearSelection" target=_parent class=ISymbol>clearSelection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_createLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.createLayer" target=_parent class=ISymbol>createLayer</a>, <span class=IParent>SelectorManager</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_ChangeElementCommand><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.ChangeElementCommand" target=_parent class=ISymbol>ChangeElementCommand</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_cleanupElement><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.cleanupElement" target=_parent class=ISymbol>cleanupElement</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_clear><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.clear" target=_parent class=ISymbol>clear</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_clearSelection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.clearSelection" target=_parent class=ISymbol>clearSelection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_convertToNum><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.convertToNum" target=_parent class=ISymbol>convertToNum</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_createLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.createLayer" target=_parent class=ISymbol>createLayer</a>, <span class=IParent>SelectorManager</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults", "HTML");
|
||||
|
|
|
@ -11,7 +11,7 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
|
|||
|
||||
|
||||
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_getCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getCurrentLayer" target=_parent class=ISymbol>getCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getLayer" target=_parent class=ISymbol>getLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getLayerOpacity><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getLayerOpacity" target=_parent class=ISymbol>getLayerOpacity</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getLayerVisibility><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getLayerVisibility" target=_parent class=ISymbol>getLayerVisibility</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getNextRedoCommandText><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getNextRedoCommandText" target=_parent class=ISymbol>getNextRedoCommandText</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getNextUndoCommandText><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getNextUndoCommandText" target=_parent class=ISymbol>getNextUndoCommandText</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getNumLayers><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getNumLayers" target=_parent class=ISymbol>getNumLayers</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getRedoStackSize><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getRedoStackSize" target=_parent class=ISymbol>getRedoStackSize</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getRubberBandBox><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.SelectorManager.getRubberBandBox" target=_parent class=ISymbol>getRubberBandBox</a>, <span class=IParent>SelectorManager.<wbr>SelectorManager</span></div></div><div class=SRResult id=SR_getSvgString><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getSvgString" target=_parent class=ISymbol>getSvgString</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getUndoStackSize><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getUndoStackSize" target=_parent class=ISymbol>getUndoStackSize</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getVersion><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getVersion" target=_parent class=ISymbol>getVersion</a>, <span class=IParent>SelectorManager</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_getCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getCurrentLayer" target=_parent class=ISymbol>getCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getId><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getId" target=_parent class=ISymbol>getId</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getLayer" target=_parent class=ISymbol>getLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getLayerOpacity><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getLayerOpacity" target=_parent class=ISymbol>getLayerOpacity</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getLayerVisibility><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getLayerVisibility" target=_parent class=ISymbol>getLayerVisibility</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getNextId><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getNextId" target=_parent class=ISymbol>getNextId</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getNextRedoCommandText><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getNextRedoCommandText" target=_parent class=ISymbol>getNextRedoCommandText</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getNextUndoCommandText><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getNextUndoCommandText" target=_parent class=ISymbol>getNextUndoCommandText</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getNumLayers><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getNumLayers" target=_parent class=ISymbol>getNumLayers</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getRedoStackSize><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getRedoStackSize" target=_parent class=ISymbol>getRedoStackSize</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getRubberBandBox><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.SelectorManager.getRubberBandBox" target=_parent class=ISymbol>getRubberBandBox</a>, <span class=IParent>SelectorManager.<wbr>SelectorManager</span></div></div><div class=SRResult id=SR_getSvgString><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getSvgString" target=_parent class=ISymbol>getSvgString</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getUndoStackSize><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.getUndoStackSize" target=_parent class=ISymbol>getUndoStackSize</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_getUrlFromAttr><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getUrlFromAttr" target=_parent class=ISymbol>getUrlFromAttr</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_getVersion><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.getVersion" target=_parent class=ISymbol>getVersion</a>, <span class=IParent>SelectorManager</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults", "HTML");
|
||||
|
|
|
@ -11,7 +11,7 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
|
|||
|
||||
|
||||
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_redo><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.redo" target=_parent class=ISymbol>redo</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_releaseSelector><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.SelectorManager.releaseSelector" target=_parent class=ISymbol>releaseSelector</a>, <span class=IParent>SelectorManager.<wbr>SelectorManager</span></div></div><div class=SRResult id=SR_RemoveElementCommand><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.RemoveElementCommand" target=_parent class=ISymbol>RemoveElementCommand</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_removeFromSelection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.removeFromSelection" target=_parent class=ISymbol>removeFromSelection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_renameCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.renameCurrentLayer" target=_parent class=ISymbol>renameCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_requestSelector><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.SelectorManager.requestSelector" target=_parent class=ISymbol>requestSelector</a>, <span class=IParent>SelectorManager.<wbr>SelectorManager</span></div></div><div class=SRResult id=SR_reset><div class=IEntry><a href="../files/svgcanvas-js.html#Selector.Selector.reset" target=_parent class=ISymbol>reset</a>, <span class=IParent>Selector.<wbr>Selector</span></div></div><div class=SRResult id=SR_resetUndoStack><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.resetUndoStack" target=_parent class=ISymbol>resetUndoStack</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_resize><div class=IEntry><a href="../files/svgcanvas-js.html#Selector.Selector.resize" target=_parent class=ISymbol>resize</a>, <span class=IParent>Selector.<wbr>Selector</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_redo><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.undoMgr.redo" target=_parent class=ISymbol>redo</a>, <span class=IParent>SvgCanvas.<wbr>undoMgr</span></div></div><div class=SRResult id=SR_releaseSelector><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.SelectorManager.releaseSelector" target=_parent class=ISymbol>releaseSelector</a>, <span class=IParent>SelectorManager.<wbr>SelectorManager</span></div></div><div class=SRResult id=SR_RemoveElementCommand><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.RemoveElementCommand" target=_parent class=ISymbol>RemoveElementCommand</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_removeFromSelection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.removeFromSelection" target=_parent class=ISymbol>removeFromSelection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_removeUnusedDefElems><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.removeUnusedDefElems" target=_parent class=ISymbol>removeUnusedDefElems</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_renameCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.renameCurrentLayer" target=_parent class=ISymbol>renameCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_requestSelector><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.SelectorManager.requestSelector" target=_parent class=ISymbol>requestSelector</a>, <span class=IParent>SelectorManager.<wbr>SelectorManager</span></div></div><div class=SRResult id=SR_reset><div class=IEntry><a href="../files/svgcanvas-js.html#Selector.Selector.reset" target=_parent class=ISymbol>reset</a>, <span class=IParent>Selector.<wbr>Selector</span></div></div><div class=SRResult id=SR_resetUndoStack><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.resetUndoStack" target=_parent class=ISymbol>resetUndoStack</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_resize><div class=IEntry><a href="../files/svgcanvas-js.html#Selector.Selector.resize" target=_parent class=ISymbol>resize</a>, <span class=IParent>Selector.<wbr>Selector</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults", "HTML");
|
||||
|
|
|
@ -11,7 +11,7 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
|
|||
|
||||
|
||||
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_save><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.save" target=_parent class=ISymbol>save</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_selectAllInCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.selectAllInCurrentLayer" target=_parent class=ISymbol>selectAllInCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_Selection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.Selection" target=_parent class=ISymbol>Selection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_Selector><div class=IEntry><a href="../files/svgcanvas-js.html#Selector" target=_parent class=ISymbol>Selector</a></div></div><div class=SRResult id=SR_SelectorManager><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager" target=_parent class=ISymbol>SelectorManager</a></div></div><div class=SRResult id=SR_Serialization><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.Serialization" target=_parent class=ISymbol>Serialization</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setCurrentLayer" target=_parent class=ISymbol>setCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setCurrentLayerPosition><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setCurrentLayerPosition" target=_parent class=ISymbol>setCurrentLayerPosition</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setForeignString_lpaxmlString_comelt_rpa><div class=IEntry><a href="../files/extensions/ext-foreignobject-js.html#setForeignString(xmlString,elt)" target=_parent class=ISymbol>setForeignString(xmlString,elt)</a></div></div><div class=SRResult id=SR_setLayerOpacity><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setLayerOpacity" target=_parent class=ISymbol>setLayerOpacity</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setLayerVisibility><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setLayerVisibility" target=_parent class=ISymbol>setLayerVisibility</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setSvgString><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setSvgString" target=_parent class=ISymbol>setSvgString</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_showGrips><div class=IEntry><a href="../files/svgcanvas-js.html#Selector.Selector.showGrips" target=_parent class=ISymbol>showGrips</a>, <span class=IParent>Selector.<wbr>Selector</span></div></div><div class=SRResult id=SR_SvgCanvas><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas" target=_parent class=ISymbol>SvgCanvas</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_sanitizeSvg><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.sanitizeSvg" target=_parent class=ISymbol>sanitizeSvg</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_save><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.save" target=_parent class=ISymbol>save</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_selectAllInCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.selectAllInCurrentLayer" target=_parent class=ISymbol>selectAllInCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_Selection><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.Selection" target=_parent class=ISymbol>Selection</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_Selector><div class=IEntry><a href="../files/svgcanvas-js.html#Selector" target=_parent class=ISymbol>Selector</a></div></div><div class=SRResult id=SR_SelectorManager><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager" target=_parent class=ISymbol>SelectorManager</a></div></div><div class=SRResult id=SR_Serialization><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.Serialization" target=_parent class=ISymbol>Serialization</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setCurrentLayer><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setCurrentLayer" target=_parent class=ISymbol>setCurrentLayer</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setCurrentLayerPosition><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setCurrentLayerPosition" target=_parent class=ISymbol>setCurrentLayerPosition</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setForeignString_lpaxmlString_comelt_rpa><div class=IEntry><a href="../files/extensions/ext-foreignobject-js.html#setForeignString(xmlString,elt)" target=_parent class=ISymbol>setForeignString(xmlString,elt)</a></div></div><div class=SRResult id=SR_setIdPrefix><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setIdPrefix" target=_parent class=ISymbol>setIdPrefix</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setLayerOpacity><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setLayerOpacity" target=_parent class=ISymbol>setLayerOpacity</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setLayerVisibility><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setLayerVisibility" target=_parent class=ISymbol>setLayerVisibility</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setSvgString><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.setSvgString" target=_parent class=ISymbol>setSvgString</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_setUnitAttr><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.setUnitAttr" target=_parent class=ISymbol>setUnitAttr</a>, <span class=IParent>SvgCanvas</span></div></div><div class=SRResult id=SR_showGrips><div class=IEntry><a href="../files/svgcanvas-js.html#Selector.Selector.showGrips" target=_parent class=ISymbol>showGrips</a>, <span class=IParent>Selector.<wbr>Selector</span></div></div><div class=SRResult id=SR_SvgCanvas><div class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas" target=_parent class=ISymbol>SvgCanvas</a></div></div><div class=SRResult id=SR_svgCanvasToString><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.svgCanvasToString" target=_parent class=ISymbol>svgCanvasToString</a>, <span class=IParent>SelectorManager</span></div></div><div class=SRResult id=SR_svgToString><div class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.svgToString" target=_parent class=ISymbol>svgToString</a>, <span class=IParent>SelectorManager</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults", "HTML");
|
||||
|
|
|
@ -228,9 +228,6 @@ var canvas = this,
|
|||
htmlns = "http://www.w3.org/1999/xhtml",
|
||||
mathns = "http://www.w3.org/1998/Math/MathML",
|
||||
|
||||
// Prefix string for element IDs
|
||||
idprefix = "svg_",
|
||||
|
||||
// Map of units, those set to 0 are updated later based on calculations
|
||||
unit_types = {'em':0,'ex':0,'px':1,'cm':35.43307,'mm':3.543307,'in':90,'pt':1.25,'pc':15,'%':0},
|
||||
|
||||
|
@ -320,7 +317,9 @@ $(opac_ani).attr({
|
|||
fill: 'freeze'
|
||||
}).appendTo(svgroot);
|
||||
|
||||
// Unit conversion functions
|
||||
// Group: Unit conversion functions
|
||||
|
||||
// Set the scope for these functions
|
||||
var convertToNum, convertToUnit, setUnitAttr;
|
||||
|
||||
(function() {
|
||||
|
@ -329,8 +328,13 @@ var convertToNum, convertToUnit, setUnitAttr;
|
|||
var unit_attrs = $.merge(['r','radius'], w_attrs);
|
||||
$.merge(unit_attrs, h_attrs);
|
||||
|
||||
// Function: convertToNum
|
||||
// Converts given values to numbers. Attributes must be supplied in
|
||||
// case a percentage is given
|
||||
//
|
||||
// Parameters:
|
||||
// attr - String with the name of the attribute associated with the value
|
||||
// val - String with the attribute value to convert
|
||||
convertToNum = function(attr, val) {
|
||||
// Return a number if that's what it already is
|
||||
if(!isNaN(val)) return val-0;
|
||||
|
@ -355,6 +359,14 @@ var convertToNum, convertToUnit, setUnitAttr;
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
// Function: setUnitAttr
|
||||
// Sets an element's attribute based on the unit in its current value.
|
||||
//
|
||||
// Parameters:
|
||||
// elem - DOM element to be changed
|
||||
// attr - String with the name of the attribute associated with the value
|
||||
// val - String with the attribute value to convert
|
||||
setUnitAttr = function(elem, attr, val) {
|
||||
if(!isNaN(val)) {
|
||||
// New value is a number, so check currently used unit
|
||||
|
@ -383,10 +395,15 @@ var convertToNum, convertToUnit, setUnitAttr;
|
|||
val += unit;
|
||||
}
|
||||
}
|
||||
|
||||
elem.setAttribute(attr, val);
|
||||
}
|
||||
|
||||
// Function: isValidUnit
|
||||
// Check if an attribute's value is in a valid format
|
||||
//
|
||||
// Parameters:
|
||||
// attr - String with the name of the attribute associated with the value
|
||||
// val - String with the attribute value to check
|
||||
canvas.isValidUnit = function(attr, val) {
|
||||
var valid = false;
|
||||
if($.inArray(attr, unit_attrs) != -1) {
|
||||
|
@ -708,7 +725,7 @@ var BatchCommand = this.undoCmd.batch = function(text) {
|
|||
|
||||
// Function: BatchCommand.addSubCommand
|
||||
// Adds a given command to the history stack
|
||||
|
||||
//
|
||||
// Parameters:
|
||||
// cmd - The undo command object to add
|
||||
this.addSubCommand = function(cmd) { this.stack.push(cmd); };
|
||||
|
@ -875,7 +892,7 @@ var resetUndoStack, addCommandToHistory;
|
|||
var SelectorManager;
|
||||
|
||||
(function() {
|
||||
// Class: Selector
|
||||
// Interface: Selector
|
||||
// Private class for DOM element selection boxes
|
||||
//
|
||||
// Parameters:
|
||||
|
@ -1141,8 +1158,8 @@ var SelectorManager;
|
|||
this.reset(elem);
|
||||
};
|
||||
|
||||
// Class: SelectorManager
|
||||
// public class to manage all selector objects (selection boxes)
|
||||
// Interface: SelectorManager
|
||||
// Public class to manage all selector objects (selection boxes)
|
||||
SelectorManager = function() {
|
||||
|
||||
// this will hold the <g> element that contains all selector rects/grips
|
||||
|
@ -1439,7 +1456,17 @@ var SelectorManager;
|
|||
};
|
||||
// **************************************************************************************
|
||||
|
||||
var assignAttributes = function(node, attrs, suspendLength, unitCheck) {
|
||||
// Group: Helper functions
|
||||
|
||||
// Function: assignAttributes
|
||||
// Assigns multiple attributes to an element.
|
||||
//
|
||||
// Parameters:
|
||||
// node - DOM element to apply new attribute values to
|
||||
// attrs - Object with attribute keys/values
|
||||
// suspendLength - Optional integer of milliseconds to suspend redraw
|
||||
// unitCheck - Boolean to indicate the need to use setUnitAttr
|
||||
var assignAttributes = this.assignAttributes = function(node, attrs, suspendLength, unitCheck) {
|
||||
if(!suspendLength) suspendLength = 0;
|
||||
// Opera has a problem with suspendRedraw() apparently
|
||||
var handle = null;
|
||||
|
@ -1460,9 +1487,12 @@ var SelectorManager;
|
|||
if (!window.opera) svgroot.unsuspendRedraw(handle);
|
||||
};
|
||||
|
||||
// remove unneeded attributes
|
||||
// makes resulting SVG smaller
|
||||
var cleanupElement = function(element) {
|
||||
// Function: cleanupElement
|
||||
// Remove unneeded (default) attributes, makes resulting SVG smaller
|
||||
//
|
||||
// Parameters:
|
||||
// element - DOM element to clean up
|
||||
var cleanupElement = this.cleanupElement = function(element) {
|
||||
var handle = svgroot.suspendRedraw(60);
|
||||
var defaults = {
|
||||
'fill-opacity':1,
|
||||
|
@ -1477,6 +1507,7 @@ var SelectorManager;
|
|||
'rx':0,
|
||||
'ry':0
|
||||
}
|
||||
|
||||
for(var attr in defaults) {
|
||||
var val = defaults[attr];
|
||||
if(element.getAttribute(attr) == val) {
|
||||
|
@ -1487,7 +1518,18 @@ var SelectorManager;
|
|||
svgroot.unsuspendRedraw(handle);
|
||||
};
|
||||
|
||||
var addSvgElementFromJson = this.updateElementFromJson = function(data) {
|
||||
// Function: addSvgElementFromJson
|
||||
// Create a new SVG element based on the given object keys/values and add it to the current layer
|
||||
// The element will be ran through cleanupElement before being returned
|
||||
//
|
||||
// Parameters:
|
||||
// data - Object with the following keys/values:
|
||||
// * element - DOM element to create
|
||||
// * attr - Object with attributes/values to assign to the new element
|
||||
// * curStyles - Boolean indicating that current style attributes should be applied first
|
||||
//
|
||||
// Returns: The new element
|
||||
var addSvgElementFromJson = this.addSvgElementFromJson = function(data) {
|
||||
var shape = getElem(data.attr.id);
|
||||
// if shape is a path but we need to create a rect/ellipse, then remove the path
|
||||
if (shape && data.element != shape.tagName) {
|
||||
|
@ -1532,19 +1574,39 @@ var SelectorManager;
|
|||
// svgroot.appendChild(svgthumb);
|
||||
|
||||
})();
|
||||
|
||||
// z-ordered array of tuples containing layer names and <g> elements
|
||||
// the first layer is the one at the bottom of the rendering
|
||||
var all_layers = [],
|
||||
|
||||
// Object to contain image data for raster images that were found encodable
|
||||
encodableImages = {},
|
||||
|
||||
// String with image URL of last loadable image
|
||||
last_good_img_url = curConfig.imgPath + 'logo.png',
|
||||
|
||||
// pointer to the current layer <g>
|
||||
current_layer = null,
|
||||
|
||||
// Object with save options
|
||||
save_options = {round_digits: 5},
|
||||
|
||||
// Boolean indicating whether or not a draw action has been started
|
||||
started = false,
|
||||
|
||||
// Integer with internal ID number for the latest element
|
||||
obj_num = 1,
|
||||
|
||||
// String with an element's initial transform attribute value
|
||||
start_transform = null,
|
||||
|
||||
// String indicating the current editor mode
|
||||
current_mode = "select",
|
||||
|
||||
// String with the current direction in which an element is being resized
|
||||
current_resize_mode = "none",
|
||||
|
||||
// Object containing data for the currently selected styles
|
||||
all_properties = {
|
||||
shape: {
|
||||
fill: "#" + curConfig.initFill.color,
|
||||
|
@ -1569,21 +1631,38 @@ var SelectorManager;
|
|||
font_family: 'serif'
|
||||
});
|
||||
|
||||
// Current shape style properties
|
||||
var cur_shape = all_properties.shape,
|
||||
|
||||
// Current text style properties
|
||||
cur_text = all_properties.text,
|
||||
|
||||
// Current general properties
|
||||
cur_properties = cur_shape,
|
||||
|
||||
// Float displaying the current zoom level (1 = 100%, .5 = 50%, etc)
|
||||
current_zoom = 1,
|
||||
// this will hold all the currently selected elements
|
||||
|
||||
// Array with all the currently selected elements
|
||||
// default size of 1 until it needs to grow bigger
|
||||
selectedElements = new Array(1),
|
||||
// this holds the selected's bbox
|
||||
|
||||
// Array with selected elements' Bounding box object
|
||||
selectedBBoxes = new Array(1),
|
||||
|
||||
// The DOM element that was just selected
|
||||
justSelected = null,
|
||||
|
||||
// this object manages selectors for us
|
||||
selectorManager = new SelectorManager(),
|
||||
|
||||
// DOM element for selection rectangle drawn by the user
|
||||
rubberBox = null,
|
||||
events = {},
|
||||
|
||||
// Array of current BBoxes (still needed?)
|
||||
curBBoxes = [],
|
||||
|
||||
// Object to contain all included extensions
|
||||
extensions = {};
|
||||
|
||||
// Should this return an array by default, so extension results aren't overwritten?
|
||||
|
@ -1603,7 +1682,7 @@ var SelectorManager;
|
|||
}
|
||||
|
||||
// This method rounds the incoming value to the nearest value based on the current_zoom
|
||||
var round = function(val){
|
||||
var round = this.round = function(val) {
|
||||
return parseInt(val*current_zoom)/current_zoom;
|
||||
};
|
||||
|
||||
|
@ -1616,7 +1695,7 @@ var SelectorManager;
|
|||
// Reference:
|
||||
// Firefox does not implement getIntersectionList(), see https://bugzilla.mozilla.org/show_bug.cgi?id=501421
|
||||
// Webkit does not implement getIntersectionList(), see https://bugs.webkit.org/show_bug.cgi?id=11274
|
||||
var getIntersectionList = function(rect) {
|
||||
var getIntersectionList = this.getIntersectionList = function(rect) {
|
||||
if (rubberBox == null) { return null; }
|
||||
|
||||
if(!curBBoxes.length) {
|
||||
|
@ -1650,9 +1729,20 @@ var SelectorManager;
|
|||
return resultList;
|
||||
};
|
||||
|
||||
// Set scope for these functions
|
||||
var getId, getNextId;
|
||||
|
||||
// private functions
|
||||
var getId = function() {
|
||||
(function(c) {
|
||||
|
||||
// Object to contain editor event names and callback functions
|
||||
var events = {};
|
||||
|
||||
// Prefix string for element IDs
|
||||
var idprefix = "svg_";
|
||||
|
||||
// Function: getId
|
||||
// Returns the last created DOM element ID string
|
||||
getId = c.getId = function() {
|
||||
if (events["getid"]) return call("getid", obj_num);
|
||||
if (randomize_ids) {
|
||||
return idprefix + nonce +'_' + obj_num;
|
||||
|
@ -1661,7 +1751,9 @@ var SelectorManager;
|
|||
}
|
||||
};
|
||||
|
||||
var getNextId = function() {
|
||||
// Function: getNextId
|
||||
// Creates and returns a unique ID string for a DOM element
|
||||
getNextId = c.getNextId = function() {
|
||||
// ensure the ID does not exist
|
||||
var id = getId();
|
||||
|
||||
|
@ -1672,15 +1764,50 @@ var SelectorManager;
|
|||
return id;
|
||||
};
|
||||
|
||||
var call = function(event, arg) {
|
||||
// Run the callback function associated with the given event
|
||||
//
|
||||
// Parameters:
|
||||
// event - String with the event name
|
||||
// arg - Argument to pass through to the callback function
|
||||
call = c.call = function(event, arg) {
|
||||
if (events[event]) {
|
||||
return events[event](this,arg);
|
||||
}
|
||||
};
|
||||
|
||||
// this function sanitizes the input node and its children
|
||||
// this function only keeps what is allowed from our whitelist defined above
|
||||
var sanitizeSvg = function(node) {
|
||||
// Function: bind
|
||||
// Attaches a callback function to an event
|
||||
//
|
||||
// Parameters:
|
||||
// event - String indicating the name of the event
|
||||
// f - The callback function to bind to the event
|
||||
//
|
||||
// Return:
|
||||
// The previous event
|
||||
c.bind = function(event, f) {
|
||||
var old = events[event];
|
||||
events[event] = f;
|
||||
return old;
|
||||
};
|
||||
|
||||
// Function: setIdPrefix
|
||||
// Changes the ID prefix to the given value
|
||||
//
|
||||
// Parameters:
|
||||
// p - String with the new prefix
|
||||
c.setIdPrefix = function(p) {
|
||||
idprefix = p;
|
||||
};
|
||||
}(canvas));
|
||||
|
||||
|
||||
// Function: sanitizeSvg
|
||||
// Sanitizes the input node and its children
|
||||
// It only keeps what is allowed from our whitelist defined above
|
||||
//
|
||||
// Parameters:
|
||||
// node - The DOM element to be checked, will also check its children
|
||||
var sanitizeSvg = this.sanitizeSvg = function(node) {
|
||||
// we only care about element nodes
|
||||
// automatically return for all comment, etc nodes
|
||||
// for text, we do a whitespace trim
|
||||
|
@ -1804,11 +1931,18 @@ var SelectorManager;
|
|||
}
|
||||
};
|
||||
|
||||
// extracts the URL from the url(...) syntax of some attributes. Three variants:
|
||||
// Function: getUrlFromAttr
|
||||
// Extracts the URL from the url(...) syntax of some attributes. Three variants:
|
||||
// i.e. <circle fill="url(someFile.svg#foo)" /> or
|
||||
// <circle fill="url('someFile.svg#foo')" /> or
|
||||
// <circle fill='url("someFile.svg#foo")' />
|
||||
this.getUrlFromAttr = function(attrVal) {
|
||||
//
|
||||
// Parameters:
|
||||
// attrVal - The attribute value as a string
|
||||
//
|
||||
// Returns:
|
||||
// String with just the URL
|
||||
var getUrlFromAttr = this.getUrlFromAttr = function(attrVal) {
|
||||
if (attrVal) {
|
||||
// url("#somegrad")
|
||||
if (attrVal.indexOf('url("') == 0) {
|
||||
|
@ -1824,253 +1958,6 @@ var SelectorManager;
|
|||
}
|
||||
return null;
|
||||
};
|
||||
var getUrlFromAttr = this.getUrlFromAttr;
|
||||
|
||||
var removeUnusedDefElems = function() {
|
||||
var defs = svgcontent.getElementsByTagNameNS(svgns, "defs");
|
||||
if(!defs || !defs.length) return 0;
|
||||
|
||||
var defelem_uses = [],
|
||||
numRemoved = 0;
|
||||
var attrs = ['fill', 'stroke', 'filter', 'marker-start', 'marker-mid', 'marker-end'];
|
||||
var alen = attrs.length;
|
||||
|
||||
var all_els = svgcontent.getElementsByTagNameNS(svgns, '*');
|
||||
var all_len = all_els.length;
|
||||
|
||||
for(var i=0; i<all_len; i++) {
|
||||
var el = all_els[i];
|
||||
for(var j = 0; j < alen; j++) {
|
||||
var ref = getUrlFromAttr(el.getAttribute(attrs[j]));
|
||||
if(ref) defelem_uses.push(ref.substr(1));
|
||||
}
|
||||
|
||||
// gradients can refer to other gradients
|
||||
var href = el.getAttributeNS(xlinkns, "href");
|
||||
if (href && href.indexOf('#') == 0) {
|
||||
defelem_uses.push(href.substr(1));
|
||||
}
|
||||
};
|
||||
|
||||
var defelems = $(svgcontent).find("linearGradient, radialGradient, filter, marker");
|
||||
defelem_ids = [],
|
||||
i = defelems.length;
|
||||
while (i--) {
|
||||
var defelem = defelems[i];
|
||||
var id = defelem.id;
|
||||
if($.inArray(id, defelem_uses) == -1) {
|
||||
// Not found, so remove
|
||||
defelem.parentNode.removeChild(defelem);
|
||||
numRemoved++;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove defs if empty
|
||||
var i = defs.length;
|
||||
while (i--) {
|
||||
var def = defs[i];
|
||||
if(!def.getElementsByTagNameNS(svgns,'*').length) {
|
||||
def.parentNode.removeChild(def);
|
||||
}
|
||||
}
|
||||
|
||||
return numRemoved;
|
||||
}
|
||||
|
||||
var svgCanvasToString = function() {
|
||||
// keep calling it until there are none to remove
|
||||
while (removeUnusedDefElems() > 0) {};
|
||||
|
||||
pathActions.clear(true);
|
||||
|
||||
// Keep SVG-Edit comment on top
|
||||
$.each(svgcontent.childNodes, function(i, node) {
|
||||
if(i && node.nodeType == 8 && node.data.indexOf('Created with') != -1) {
|
||||
svgcontent.insertBefore(node, svgcontent.firstChild);
|
||||
}
|
||||
});
|
||||
|
||||
var output = svgToString(svgcontent, 0);
|
||||
return output;
|
||||
}
|
||||
|
||||
var svgToString = function(elem, indent) {
|
||||
var out = new Array();
|
||||
|
||||
if (elem) {
|
||||
cleanupElement(elem);
|
||||
var attrs = elem.attributes,
|
||||
attr,
|
||||
i,
|
||||
childs = elem.childNodes;
|
||||
|
||||
for (var i=0; i<indent; i++) out.push(" ");
|
||||
out.push("<"); out.push(elem.nodeName);
|
||||
if(elem.id == 'svgcontent') {
|
||||
// Process root element separately
|
||||
var res = canvas.getResolution();
|
||||
out.push(' width="' + res.w + '" height="' + res.h + '" xmlns="'+svgns+'"');
|
||||
|
||||
var nsuris = {};
|
||||
|
||||
// Check elements for namespaces, add if found
|
||||
$(elem).find('*').andSelf().each(function() {
|
||||
var el = this;
|
||||
$.each(this.attributes, function(i, attr) {
|
||||
var uri = attr.namespaceURI;
|
||||
if(uri && !nsuris[uri] && nsMap[uri] !== 'xmlns' && nsMap[uri] !== 'xml' ) {
|
||||
nsuris[uri] = true;
|
||||
out.push(" xmlns:" + nsMap[uri] + '="' + uri +'"');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var i = attrs.length;
|
||||
while (i--) {
|
||||
attr = attrs.item(i);
|
||||
var attrVal = toXml(attr.nodeValue);
|
||||
|
||||
// Namespaces have already been dealt with, so skip
|
||||
if(attr.nodeName.indexOf('xmlns:') === 0) continue;
|
||||
|
||||
// only serialize attributes we don't use internally
|
||||
if (attrVal != "" &&
|
||||
$.inArray(attr.localName, ['width','height','xmlns','x','y','viewBox','id','overflow']) == -1)
|
||||
{
|
||||
|
||||
if(!attr.namespaceURI || nsMap[attr.namespaceURI]) {
|
||||
out.push(' ');
|
||||
out.push(attr.nodeName); out.push("=\"");
|
||||
out.push(attrVal); out.push("\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (var i=attrs.length-1; i>=0; i--) {
|
||||
attr = attrs.item(i);
|
||||
var attrVal = toXml(attr.nodeValue);
|
||||
//remove bogus attributes added by Gecko
|
||||
if ($.inArray(attr.localName, ['-moz-math-font-style', '_moz-math-font-style']) !== -1) continue;
|
||||
if (attrVal != "") {
|
||||
if(attrVal.indexOf('pointer-events') == 0) continue;
|
||||
if(attr.localName == "class" && attrVal.indexOf('se_') == 0) continue;
|
||||
out.push(" ");
|
||||
if(attr.localName == 'd') attrVal = pathActions.convertPath(elem, true);
|
||||
if(!isNaN(attrVal)) {
|
||||
attrVal = shortFloat(attrVal);
|
||||
}
|
||||
|
||||
// Embed images when saving
|
||||
if(save_options.apply
|
||||
&& elem.nodeName == 'image'
|
||||
&& attr.localName == 'href'
|
||||
&& save_options.images
|
||||
&& save_options.images == 'embed')
|
||||
{
|
||||
var img = encodableImages[attrVal];
|
||||
if(img) attrVal = img;
|
||||
}
|
||||
|
||||
// map various namespaces to our fixed namespace prefixes
|
||||
// (the default xmlns attribute itself does not get a prefix)
|
||||
if(!attr.namespaceURI || attr.namespaceURI == svgns || nsMap[attr.namespaceURI]) {
|
||||
out.push(attr.nodeName); out.push("=\"");
|
||||
out.push(attrVal); out.push("\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (elem.hasChildNodes()) {
|
||||
out.push(">");
|
||||
indent++;
|
||||
var bOneLine = false;
|
||||
for (var i=0; i<childs.length; i++)
|
||||
{
|
||||
var child = childs.item(i);
|
||||
switch(child.nodeType) {
|
||||
case 1: // element node
|
||||
out.push("\n");
|
||||
out.push(svgToString(childs.item(i), indent));
|
||||
break;
|
||||
case 3: // text node
|
||||
var str = child.nodeValue.replace(/^\s+|\s+$/g, "");
|
||||
if (str != "") {
|
||||
bOneLine = true;
|
||||
out.push(toXml(str) + "");
|
||||
}
|
||||
break;
|
||||
case 8: // comment
|
||||
out.push("\n");
|
||||
out.push(new Array(indent+1).join(" "));
|
||||
out.push("<!--");
|
||||
out.push(child.data);
|
||||
out.push("-->");
|
||||
break;
|
||||
} // switch on node type
|
||||
}
|
||||
indent--;
|
||||
if (!bOneLine) {
|
||||
out.push("\n");
|
||||
for (var i=0; i<indent; i++) out.push(" ");
|
||||
}
|
||||
out.push("</"); out.push(elem.nodeName); out.push(">");
|
||||
} else {
|
||||
out.push("/>");
|
||||
}
|
||||
}
|
||||
return out.join('');
|
||||
}; // end svgToString()
|
||||
|
||||
this.embedImage = function(val, callback) {
|
||||
|
||||
// load in the image and once it's loaded, get the dimensions
|
||||
$(new Image()).load(function() {
|
||||
// create a canvas the same size as the raster image
|
||||
var canvas = document.createElement("canvas");
|
||||
canvas.width = this.width;
|
||||
canvas.height = this.height;
|
||||
// load the raster image into the canvas
|
||||
canvas.getContext("2d").drawImage(this,0,0);
|
||||
// retrieve the data: URL
|
||||
try {
|
||||
var urldata = ';svgedit_url=' + encodeURIComponent(val);
|
||||
urldata = canvas.toDataURL().replace(';base64',urldata+';base64');
|
||||
encodableImages[val] = urldata;
|
||||
} catch(e) {
|
||||
encodableImages[val] = false;
|
||||
}
|
||||
last_good_img_url = val;
|
||||
if(callback) callback(encodableImages[val]);
|
||||
}).attr('src',val);
|
||||
}
|
||||
|
||||
// importNode, like cloneNode, causes the comma-to-period
|
||||
// issue in Opera/Win/non-en. Thankfully we can compare to the original XML
|
||||
// and simply use the original value when necessary
|
||||
this.fixOperaXML = function(elem, orig_el) {
|
||||
var x_attrs = elem.attributes;
|
||||
$.each(x_attrs, function(i, attr) {
|
||||
if(attr.nodeValue.indexOf(',') == -1) return;
|
||||
// attr val has comma, so let's get the good value
|
||||
var ns = attr.prefix == 'xlink' ? xlinkns :
|
||||
attr.prefix == "xml" ? xmlns : null;
|
||||
var good_attrval = orig_el.getAttribute(attr.localName);
|
||||
if(ns) {
|
||||
elem.setAttributeNS(ns, attr.nodeName, good_attrval);
|
||||
} else {
|
||||
elem.setAttribute(attr.nodeName, good_attrval);
|
||||
}
|
||||
});
|
||||
|
||||
var childs = elem.childNodes;
|
||||
var o_childs = orig_el.childNodes;
|
||||
$.each(childs, function(i, child) {
|
||||
if(child.nodeType == 1) {
|
||||
canvas.fixOperaXML(child, o_childs[i]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var recalculateAllSelectedDimensions = function() {
|
||||
var text = (current_resize_mode == "none" ? "position" : "size");
|
||||
|
@ -5987,14 +5874,16 @@ var SelectorManager;
|
|||
|
||||
// Opera/win/non-EN throws an error here.
|
||||
// TODO: Find out why!
|
||||
try {
|
||||
// Presumed fixed in Opera 10.5, so commented out for now
|
||||
|
||||
// try {
|
||||
var len = segList.numberOfItems;
|
||||
} catch(err) {
|
||||
var fixed_d = pathActions.convertPath(path);
|
||||
path.setAttribute('d', fixed_d);
|
||||
segList = path.pathSegList;
|
||||
var len = segList.numberOfItems;
|
||||
}
|
||||
// } catch(err) {
|
||||
// var fixed_d = pathActions.convertPath(path);
|
||||
// path.setAttribute('d', fixed_d);
|
||||
// segList = path.pathSegList;
|
||||
// var len = segList.numberOfItems;
|
||||
// }
|
||||
for (var i = 0; i < len; ++i) {
|
||||
var seg = segList.getItem(i);
|
||||
var type = seg.pathSegType;
|
||||
|
@ -6634,10 +6523,255 @@ var SelectorManager;
|
|||
// identified, a ChangeElementCommand is created and stored on the stack for those attrs
|
||||
// this is done in when we recalculate the selected dimensions()
|
||||
|
||||
// public functions
|
||||
|
||||
// Group: Serialization
|
||||
|
||||
// Function: removeUnusedDefElems
|
||||
// Looks at DOM elements inside the <defs> to see if they are referred to,
|
||||
// removes them from the DOM if they are not.
|
||||
//
|
||||
// Returns:
|
||||
// The amount of elements that were removed
|
||||
var removeUnusedDefElems = this.removeUnusedDefElems = function() {
|
||||
var defs = svgcontent.getElementsByTagNameNS(svgns, "defs");
|
||||
if(!defs || !defs.length) return 0;
|
||||
|
||||
var defelem_uses = [],
|
||||
numRemoved = 0;
|
||||
var attrs = ['fill', 'stroke', 'filter', 'marker-start', 'marker-mid', 'marker-end'];
|
||||
var alen = attrs.length;
|
||||
|
||||
var all_els = svgcontent.getElementsByTagNameNS(svgns, '*');
|
||||
var all_len = all_els.length;
|
||||
|
||||
for(var i=0; i<all_len; i++) {
|
||||
var el = all_els[i];
|
||||
for(var j = 0; j < alen; j++) {
|
||||
var ref = getUrlFromAttr(el.getAttribute(attrs[j]));
|
||||
if(ref) defelem_uses.push(ref.substr(1));
|
||||
}
|
||||
|
||||
// gradients can refer to other gradients
|
||||
var href = el.getAttributeNS(xlinkns, "href");
|
||||
if (href && href.indexOf('#') == 0) {
|
||||
defelem_uses.push(href.substr(1));
|
||||
}
|
||||
};
|
||||
|
||||
var defelems = $(svgcontent).find("linearGradient, radialGradient, filter, marker");
|
||||
defelem_ids = [],
|
||||
i = defelems.length;
|
||||
while (i--) {
|
||||
var defelem = defelems[i];
|
||||
var id = defelem.id;
|
||||
if($.inArray(id, defelem_uses) == -1) {
|
||||
// Not found, so remove
|
||||
defelem.parentNode.removeChild(defelem);
|
||||
numRemoved++;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove defs if empty
|
||||
var i = defs.length;
|
||||
while (i--) {
|
||||
var def = defs[i];
|
||||
if(!def.getElementsByTagNameNS(svgns,'*').length) {
|
||||
def.parentNode.removeChild(def);
|
||||
}
|
||||
}
|
||||
|
||||
return numRemoved;
|
||||
}
|
||||
|
||||
// Function: svgCanvasToString
|
||||
// Main function to set up the SVG content for output
|
||||
//
|
||||
// Returns:
|
||||
// String containing the SVG image for output
|
||||
var svgCanvasToString = this.svgCanvasToString = function() {
|
||||
// keep calling it until there are none to remove
|
||||
while (removeUnusedDefElems() > 0) {};
|
||||
|
||||
pathActions.clear(true);
|
||||
|
||||
// Keep SVG-Edit comment on top
|
||||
$.each(svgcontent.childNodes, function(i, node) {
|
||||
if(i && node.nodeType == 8 && node.data.indexOf('Created with') != -1) {
|
||||
svgcontent.insertBefore(node, svgcontent.firstChild);
|
||||
}
|
||||
});
|
||||
|
||||
var output = svgToString(svgcontent, 0);
|
||||
return output;
|
||||
}
|
||||
|
||||
// Function: svgToString
|
||||
// Sub function ran on each SVG element to convert it to a string as desired
|
||||
//
|
||||
// Parameters:
|
||||
// elem - The SVG element to convert
|
||||
// indent - Integer with the amount of spaces to indent this tag
|
||||
//
|
||||
// Returns:
|
||||
// String with the given element as an SVG tag
|
||||
var svgToString = this.svgToString = function(elem, indent) {
|
||||
var out = new Array();
|
||||
|
||||
if (elem) {
|
||||
cleanupElement(elem);
|
||||
var attrs = elem.attributes,
|
||||
attr,
|
||||
i,
|
||||
childs = elem.childNodes;
|
||||
|
||||
for (var i=0; i<indent; i++) out.push(" ");
|
||||
out.push("<"); out.push(elem.nodeName);
|
||||
if(elem.id == 'svgcontent') {
|
||||
// Process root element separately
|
||||
var res = canvas.getResolution();
|
||||
out.push(' width="' + res.w + '" height="' + res.h + '" xmlns="'+svgns+'"');
|
||||
|
||||
var nsuris = {};
|
||||
|
||||
// Check elements for namespaces, add if found
|
||||
$(elem).find('*').andSelf().each(function() {
|
||||
var el = this;
|
||||
$.each(this.attributes, function(i, attr) {
|
||||
var uri = attr.namespaceURI;
|
||||
if(uri && !nsuris[uri] && nsMap[uri] !== 'xmlns' && nsMap[uri] !== 'xml' ) {
|
||||
nsuris[uri] = true;
|
||||
out.push(" xmlns:" + nsMap[uri] + '="' + uri +'"');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var i = attrs.length;
|
||||
while (i--) {
|
||||
attr = attrs.item(i);
|
||||
var attrVal = toXml(attr.nodeValue);
|
||||
|
||||
// Namespaces have already been dealt with, so skip
|
||||
if(attr.nodeName.indexOf('xmlns:') === 0) continue;
|
||||
|
||||
// only serialize attributes we don't use internally
|
||||
if (attrVal != "" &&
|
||||
$.inArray(attr.localName, ['width','height','xmlns','x','y','viewBox','id','overflow']) == -1)
|
||||
{
|
||||
|
||||
if(!attr.namespaceURI || nsMap[attr.namespaceURI]) {
|
||||
out.push(' ');
|
||||
out.push(attr.nodeName); out.push("=\"");
|
||||
out.push(attrVal); out.push("\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (var i=attrs.length-1; i>=0; i--) {
|
||||
attr = attrs.item(i);
|
||||
var attrVal = toXml(attr.nodeValue);
|
||||
//remove bogus attributes added by Gecko
|
||||
if ($.inArray(attr.localName, ['-moz-math-font-style', '_moz-math-font-style']) !== -1) continue;
|
||||
if (attrVal != "") {
|
||||
if(attrVal.indexOf('pointer-events') == 0) continue;
|
||||
if(attr.localName == "class" && attrVal.indexOf('se_') == 0) continue;
|
||||
out.push(" ");
|
||||
if(attr.localName == 'd') attrVal = pathActions.convertPath(elem, true);
|
||||
if(!isNaN(attrVal)) {
|
||||
attrVal = shortFloat(attrVal);
|
||||
}
|
||||
|
||||
// Embed images when saving
|
||||
if(save_options.apply
|
||||
&& elem.nodeName == 'image'
|
||||
&& attr.localName == 'href'
|
||||
&& save_options.images
|
||||
&& save_options.images == 'embed')
|
||||
{
|
||||
var img = encodableImages[attrVal];
|
||||
if(img) attrVal = img;
|
||||
}
|
||||
|
||||
// map various namespaces to our fixed namespace prefixes
|
||||
// (the default xmlns attribute itself does not get a prefix)
|
||||
if(!attr.namespaceURI || attr.namespaceURI == svgns || nsMap[attr.namespaceURI]) {
|
||||
out.push(attr.nodeName); out.push("=\"");
|
||||
out.push(attrVal); out.push("\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (elem.hasChildNodes()) {
|
||||
out.push(">");
|
||||
indent++;
|
||||
var bOneLine = false;
|
||||
for (var i=0; i<childs.length; i++)
|
||||
{
|
||||
var child = childs.item(i);
|
||||
switch(child.nodeType) {
|
||||
case 1: // element node
|
||||
out.push("\n");
|
||||
out.push(svgToString(childs.item(i), indent));
|
||||
break;
|
||||
case 3: // text node
|
||||
var str = child.nodeValue.replace(/^\s+|\s+$/g, "");
|
||||
if (str != "") {
|
||||
bOneLine = true;
|
||||
out.push(toXml(str) + "");
|
||||
}
|
||||
break;
|
||||
case 8: // comment
|
||||
out.push("\n");
|
||||
out.push(new Array(indent+1).join(" "));
|
||||
out.push("<!--");
|
||||
out.push(child.data);
|
||||
out.push("-->");
|
||||
break;
|
||||
} // switch on node type
|
||||
}
|
||||
indent--;
|
||||
if (!bOneLine) {
|
||||
out.push("\n");
|
||||
for (var i=0; i<indent; i++) out.push(" ");
|
||||
}
|
||||
out.push("</"); out.push(elem.nodeName); out.push(">");
|
||||
} else {
|
||||
out.push("/>");
|
||||
}
|
||||
}
|
||||
return out.join('');
|
||||
}; // end svgToString()
|
||||
|
||||
// Function: embedImage
|
||||
// Converts a given image file to a data URL when possible, then runs a given callback
|
||||
//
|
||||
// Parameters:
|
||||
// val - String with the path/URL of the image
|
||||
// callback - Optional function to run when image data is found, supplies the
|
||||
// result (data URL or false) as first parameter.
|
||||
this.embedImage = function(val, callback) {
|
||||
|
||||
// load in the image and once it's loaded, get the dimensions
|
||||
$(new Image()).load(function() {
|
||||
// create a canvas the same size as the raster image
|
||||
var canvas = document.createElement("canvas");
|
||||
canvas.width = this.width;
|
||||
canvas.height = this.height;
|
||||
// load the raster image into the canvas
|
||||
canvas.getContext("2d").drawImage(this,0,0);
|
||||
// retrieve the data: URL
|
||||
try {
|
||||
var urldata = ';svgedit_url=' + encodeURIComponent(val);
|
||||
urldata = canvas.toDataURL().replace(';base64',urldata+';base64');
|
||||
encodableImages[val] = urldata;
|
||||
} catch(e) {
|
||||
encodableImages[val] = false;
|
||||
}
|
||||
last_good_img_url = val;
|
||||
if(callback) callback(encodableImages[val]);
|
||||
}).attr('src',val);
|
||||
}
|
||||
|
||||
|
||||
this.open = function() {
|
||||
// Nothing by default, handled by optional widget/extension
|
||||
};
|
||||
|
@ -6848,11 +6982,6 @@ var SelectorManager;
|
|||
}
|
||||
});
|
||||
|
||||
// Fix XML for Opera/Win/Non-EN
|
||||
if(!support.goodDecimals) {
|
||||
canvas.fixOperaXML(svgcontent, newDoc.documentElement);
|
||||
}
|
||||
|
||||
// recalculate dimensions on the top-level children so that unnecessary transforms
|
||||
// are removed
|
||||
walkTreePost(svgcontent, function(n){try{recalculateDimensions(n)}catch(e){console.log(e)}});
|
||||
|
@ -7087,10 +7216,6 @@ var SelectorManager;
|
|||
// canvas.embedImage(val);
|
||||
// });
|
||||
|
||||
// Fix XML for Opera/Win/Non-EN
|
||||
if(!support.goodDecimals) {
|
||||
canvas.fixOperaXML(svgcontent, importedNode);
|
||||
}
|
||||
|
||||
// recalculate dimensions on the top-level children so that unnecessary transforms
|
||||
// are removed
|
||||
|
@ -7825,7 +7950,6 @@ var SelectorManager;
|
|||
if (!duplicate_grad) {
|
||||
var orig_grad = grad;
|
||||
grad = defs.appendChild( svgdoc.importNode(grad, true) );
|
||||
canvas.fixOperaXML(grad, orig_grad);
|
||||
// get next id and set it on the grad
|
||||
grad.id = getNextId();
|
||||
}
|
||||
|
@ -8153,9 +8277,7 @@ var SelectorManager;
|
|||
|
||||
// returns an object that behaves like a SVGTransformList
|
||||
this.getTransformList = function(elem) {
|
||||
// Opera is included here because Opera/Win/Non-EN seems to change
|
||||
// transformlist float vals to use a comma rather than a period.
|
||||
if (isWebkit || !support.goodDecimals) {
|
||||
if (isWebkit) {
|
||||
var id = elem.id;
|
||||
if(!id) {
|
||||
// Get unique ID for temporary element
|
||||
|
@ -8186,22 +8308,6 @@ var SelectorManager;
|
|||
selected.textContent = 'a'; // Some character needed for the selector to use.
|
||||
ret = selected.getBBox();
|
||||
selected.textContent = '';
|
||||
} else if (elem.nodeName == 'g' && isOpera) {
|
||||
// deal with an opera bug here
|
||||
// the bbox on a 'g' is not correct if the elements inside have been moved
|
||||
// so we create a new g, add all the children to it, add it to the DOM, get its bbox
|
||||
// then put all the children back on the old g and remove the new g
|
||||
// (this means we make no changes to the DOM, which saves us a lot of headache at
|
||||
// the cost of performance)
|
||||
ret = selected.getBBox();
|
||||
var newg = document.createElementNS(svgns, "g");
|
||||
while (selected.firstChild) { newg.appendChild(selected.firstChild); }
|
||||
var i = selected.attributes.length;
|
||||
while(i--) { newg.setAttributeNode(selected.attributes.item(i).cloneNode(true)); }
|
||||
selected.parentNode.appendChild(newg);
|
||||
ret = newg.getBBox();
|
||||
while (newg.firstChild) { selected.appendChild(newg.firstChild); }
|
||||
selected.parentNode.removeChild(newg);
|
||||
} else if(elem.nodeName == 'path' && isWebkit) {
|
||||
ret = getPathBBox(selected);
|
||||
} else if(elem.nodeName == 'use' && !isWebkit) {
|
||||
|
@ -8299,15 +8405,6 @@ var SelectorManager;
|
|||
$(svgroot).children().each(cb);
|
||||
};
|
||||
|
||||
this.bind = function(event, f) {
|
||||
var old = events[event];
|
||||
events[event] = f;
|
||||
return old;
|
||||
};
|
||||
|
||||
this.setIdPrefix = function(p) {
|
||||
idprefix = p;
|
||||
};
|
||||
|
||||
this.getBold = function() {
|
||||
// should only have one element selected
|
||||
|
@ -9180,7 +9277,6 @@ var SelectorManager;
|
|||
|
||||
// this function no longer uses cloneNode because we need to update the id
|
||||
// of every copied element (even the descendants)
|
||||
// we also do it manually because Opera/Win/non-EN puts , instead of .
|
||||
var copyElem = function(el) {
|
||||
// manually create a copy of the element
|
||||
var new_el = document.createElementNS(el.namespaceURI, el.nodeName);
|
||||
|
@ -9197,7 +9293,7 @@ var SelectorManager;
|
|||
|
||||
// Opera's "d" value needs to be reset for Opera/Win/non-EN
|
||||
// Also needed for webkit (else does not keep curved segments on clone)
|
||||
if((isWebkit || !support.goodDecimals) && el.nodeName == 'path') {
|
||||
if((isWebkit) && el.nodeName == 'path') {
|
||||
var fixed_d = pathActions.convertPath(el);
|
||||
new_el.setAttribute('d', fixed_d);
|
||||
}
|
||||
|
@ -9492,11 +9588,15 @@ var SelectorManager;
|
|||
// TODO: Find better way to check support for this
|
||||
support.editableText = isOpera;
|
||||
|
||||
// Correct decimals on clone attributes (Opera/win/non-en)
|
||||
// Correct decimals on clone attributes (Opera < 10.5/win/non-en)
|
||||
var rect = document.createElementNS(svgns,'rect');
|
||||
rect.setAttribute('x',.1);
|
||||
var crect = rect.cloneNode(false);
|
||||
support.goodDecimals = (crect.getAttribute('x').indexOf(',') == -1);
|
||||
if(!support.goodDecimals) {
|
||||
$.alert("NOTE: This version of Opera is known to contain bugs in SVG-edit.\n\
|
||||
Please upgrade to the <a href='http://opera.com'>latest version</a> in which the problems have been fixed.");
|
||||
}
|
||||
|
||||
// Get correct em/ex values
|
||||
var rect = document.createElementNS(svgns,'rect');
|
||||
|
|
Loading…
Reference in New Issue