Update extensions for new SVG-Edit API

This commit is contained in:
Jacques Distler 2010-03-12 10:48:27 -06:00
parent 9636cab11e
commit c946c331e1
5 changed files with 5 additions and 15 deletions

View file

@ -8,8 +8,7 @@
*/ */
$(function() { svgEditor.addExtension("Arrows", function(S) {
svgCanvas.addExtension("Arrows", function(S) {
var svgcontent = S.svgcontent, var svgcontent = S.svgcontent,
addElem = S.addSvgElementFromJson, addElem = S.addSvgElementFromJson,
nonce = S.nonce, nonce = S.nonce,
@ -294,5 +293,4 @@ $(function() {
} }
}; };
});
}); });

View file

@ -9,8 +9,7 @@
// This extension adds a simple button to the contextual panel for paths // This extension adds a simple button to the contextual panel for paths
// The button toggles whether the path is open or closed // The button toggles whether the path is open or closed
$(function() { svgEditor.addExtension("ClosePath", function(S) {
svgCanvas.addExtension("ClosePath", function(S) {
var selElems, var selElems,
updateButton = function(path) { updateButton = function(path) {
var seglist = path.pathSegList, var seglist = path.pathSegList,
@ -90,5 +89,4 @@ $(function() {
} }
} }
}; };
});
}); });

View file

@ -8,8 +8,7 @@
* *
*/ */
$(function() { svgEditor.addExtension("foreignObject", function(S) {
svgCanvas.addExtension("foreignObject", function(S) {
var svgcontent = S.svgcontent, var svgcontent = S.svgcontent,
addElem = S.addSvgElementFromJson, addElem = S.addSvgElementFromJson,
selElems, selElems,
@ -275,5 +274,4 @@ $(function() {
var elem = opts.elems[0]; var elem = opts.elems[0];
} }
}; };
});
}); });

View file

@ -13,8 +13,7 @@
user the point on the canvas that was clicked on. user the point on the canvas that was clicked on.
*/ */
$(function() { svgEditor.addExtension("Hello World", function() {
svgCanvas.addExtension("Hello World", function() {
return { return {
name: "Hello World", name: "Hello World",
@ -75,6 +74,5 @@ $(function() {
} }
} }
}; };
});
}); });

View file

@ -8,8 +8,7 @@
* *
*/ */
$(function() { svgEditor.addExtension("itex", function(S) {
svgCanvas.addExtension("itex", function(S) {
var svgcontent = S.svgcontent, var svgcontent = S.svgcontent,
addElem = S.addSvgElementFromJson, addElem = S.addSvgElementFromJson,
selElems, selElems,
@ -302,5 +301,4 @@ $(function() {
var elem = opts.elems[0]; var elem = opts.elems[0];
} }
}; };
});
}); });