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-75d572ba1dddmaster
parent
c47cc7cd0e
commit
4a6ae77ba2
|
@ -7,12 +7,18 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Dependencies:
|
||||||
|
// 1) jQuery
|
||||||
|
// 2) history.js
|
||||||
|
// 3) svg_editor.js
|
||||||
|
// 4) svgcanvas.js
|
||||||
|
|
||||||
svgEditor.addExtension("eyedropper", function(S) {
|
svgEditor.addExtension("eyedropper", function(S) {
|
||||||
var svgcontent = S.svgcontent,
|
var svgcontent = S.svgcontent,
|
||||||
svgns = "http://www.w3.org/2000/svg",
|
svgns = "http://www.w3.org/2000/svg",
|
||||||
svgdoc = S.svgroot.parentNode.ownerDocument,
|
svgdoc = S.svgroot.parentNode.ownerDocument,
|
||||||
ChangeElementCommand = svgCanvas.getPrivateMethods().ChangeElementCommand,
|
ChangeElementCommand = svgedit.history.ChangeElementCommand,
|
||||||
addToHistory = svgCanvas.getPrivateMethods().addCommandToHistory,
|
addToHistory = function(cmd) { canvas.undoMgr.addCommandToHistory(cmd); },
|
||||||
currentStyle = {fillPaint: "red", fillOpacity: 1.0,
|
currentStyle = {fillPaint: "red", fillOpacity: 1.0,
|
||||||
strokePaint: "black", strokeOpacity: 1.0,
|
strokePaint: "black", strokeOpacity: 1.0,
|
||||||
strokeWidth: 5, strokeDashArray: null,
|
strokeWidth: 5, strokeDashArray: null,
|
||||||
|
|
|
@ -6404,7 +6404,7 @@ var uniquifyElems = this.uniquifyElems = function(g) {
|
||||||
var attrnode = n.getAttributeNode(attr);
|
var attrnode = n.getAttributeNode(attr);
|
||||||
if (attrnode) {
|
if (attrnode) {
|
||||||
// the incoming file has been sanitized, so we should be able to safely just strip off the leading #
|
// 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;
|
refid = url ? url.substr(1) : null;
|
||||||
if (refid) {
|
if (refid) {
|
||||||
if (!(refid in ids)) {
|
if (!(refid in ids)) {
|
||||||
|
@ -6458,7 +6458,7 @@ var uniquifyElems = this.uniquifyElems = function(g) {
|
||||||
var k = hreffers.length;
|
var k = hreffers.length;
|
||||||
while (k--) {
|
while (k--) {
|
||||||
var hreffer = hreffers[k];
|
var hreffer = hreffers[k];
|
||||||
setHref(hreffer, "#"+newid);
|
svgedit.utilities.setHref(hreffer, "#"+newid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue