Tweak a couple function calls to use full svgedit namespace methods. Update eyedropper extension to remove usage of getPrivateMethods()

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1905 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2011-01-12 07:34:07 +00:00
parent c47cc7cd0e
commit 4a6ae77ba2
2 changed files with 10 additions and 4 deletions

View File

@ -7,12 +7,18 @@
*
*/
// Dependencies:
// 1) jQuery
// 2) history.js
// 3) svg_editor.js
// 4) svgcanvas.js
svgEditor.addExtension("eyedropper", function(S) {
var svgcontent = S.svgcontent,
svgns = "http://www.w3.org/2000/svg",
svgdoc = S.svgroot.parentNode.ownerDocument,
ChangeElementCommand = svgCanvas.getPrivateMethods().ChangeElementCommand,
addToHistory = svgCanvas.getPrivateMethods().addCommandToHistory,
ChangeElementCommand = svgedit.history.ChangeElementCommand,
addToHistory = function(cmd) { canvas.undoMgr.addCommandToHistory(cmd); },
currentStyle = {fillPaint: "red", fillOpacity: 1.0,
strokePaint: "black", strokeOpacity: 1.0,
strokeWidth: 5, strokeDashArray: null,

View File

@ -6404,7 +6404,7 @@ var uniquifyElems = this.uniquifyElems = function(g) {
var attrnode = n.getAttributeNode(attr);
if (attrnode) {
// the incoming file has been sanitized, so we should be able to safely just strip off the leading #
var url = getUrlFromAttr(attrnode.value),
var url = svgedit.utilities.getUrlFromAttr(attrnode.value),
refid = url ? url.substr(1) : null;
if (refid) {
if (!(refid in ids)) {
@ -6458,7 +6458,7 @@ var uniquifyElems = this.uniquifyElems = function(g) {
var k = hreffers.length;
while (k--) {
var hreffer = hreffers[k];
setHref(hreffer, "#"+newid);
svgedit.utilities.setHref(hreffer, "#"+newid);
}
}
}