Commit e744799f authored by Thibaut Frain's avatar Thibaut Frain

Added svg-edit gadget

parent da082c9e
...@@ -284,8 +284,13 @@ module.exports = function (grunt) { ...@@ -284,8 +284,13 @@ module.exports = function (grunt) {
src: 'https://raw.githubusercontent.com/mindmup/bootstrap-wysiwyg/master/bootstrap-wysiwyg.js', src: 'https://raw.githubusercontent.com/mindmup/bootstrap-wysiwyg/master/bootstrap-wysiwyg.js',
relative_dest: 'lib/bootstrap-wysiwyg.js', relative_dest: 'lib/bootstrap-wysiwyg.js',
dest: '<%= global_config.dest %>/<%= curl.bootstrapwysiwyg.relative_dest %>' dest: '<%= global_config.dest %>/<%= curl.bootstrapwysiwyg.relative_dest %>'
},
svgedit: {
src: 'https://svg-edit.googlecode.com/files/svg-edit-2.6.zip',
relative_dest: 'lib/svg-edit-2.6',
dest: '<%= global_config.tmp %>/svgedit.zip'
} }
// qunit: { // qunit: {
// all: ['test/index.html'] // all: ['test/index.html']
}, },
...@@ -309,6 +314,10 @@ module.exports = function (grunt) { ...@@ -309,6 +314,10 @@ module.exports = function (grunt) {
bootstrap: { bootstrap: {
src: '<%= global_config.tmp %>/bootstrap.zip', src: '<%= global_config.tmp %>/bootstrap.zip',
dest: '<%= global_config.dest %>/lib/' dest: '<%= global_config.dest %>/lib/'
},
svgedit: {
src: '<%= global_config.tmp %>/svgedit.zip',
dest: '<%= global_config.dest %>/lib/'
} }
}, },
......
This diff is collapsed.
/*global window, jQuery, rJS, svgCanvas, svgEditor */
(function (window, rJS) {
"use strict";
svgEditor.setConfig({
extPath: '../lib/svg-edit-2.6/extensions/',
imgPath: '../lib/svg-edit-2.6/images/'
});
rJS(window)
.declareMethod('getContent', function () {
return window.svgCanvas.getSvgString();
})
.declareMethod('setContent', function (content) {
window.svgCanvas.setSvgString(content);
})
.declareMethod('clearContent', function () {
window.svgCanvas.clear();
});
}(window, rJS));
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