Commit 56f136b7 authored by Marco Mariani's avatar Marco Mariani

svg-edit: configure link to extensions and images, jslint

parent 94bbc634
/*global window, jQuery, rJS, svgCanvas */ /*jslint indent: 2 */
/*jslint evil: true*/ /*global window, jQuery, rJS, svgCanvas, svgEditor */
"use strict"; "use strict";
(function (window, rJS) { (function (window, rJS) {
svgEditor.setConfig({
extPath: '../lib/svg-edit-2.6/extensions/',
imgPath: '../lib/svg-edit-2.6/images/'
});
rJS(window).declareMethod('getContent', function () { rJS(window).declareMethod('getContent', function () {
console.log(window.svgCanvas.getSvgString()); console.log(window.svgCanvas.getSvgString());
return window.svgCanvas.getSvgString(); return window.svgCanvas.getSvgString();
}) }).
declareMethod('setContent', function (content) {
.declareMethod('setContent', function (content) {
console.log(window.content); console.log(window.content);
window.svgCanvas.setSvgString(content); window.svgCanvas.setSvgString(content);
}) }).
declareMethod('clearContent', function () {
.declareMethod('clearContent', function () {
window.svgCanvas.clear(); window.svgCanvas.clear();
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment