Commit 159c5a3d authored by Romain Courteaud's avatar Romain Courteaud

erp5_svg_editor: escape editor before saving

Otherwise, method draw enter an infinite loop if users selected some elements
parent aec03e70
/*jslint indent: 2 */ /*jslint indent: 2 */
/*global window, rJS, RSVP, svgCanvas */ /*global window, rJS, RSVP, svgCanvas, editor */
(function (window, rJS, RSVP) { (function (window, rJS, RSVP) {
"use strict"; "use strict";
...@@ -20,8 +20,9 @@ ...@@ -20,8 +20,9 @@
}) })
.declareMethod('getContent', function () { .declareMethod('getContent', function () {
var form_data = {}; var form_data = {};
editor.escapeMode();
form_data[this.state.key] = svgCanvas.getSvgString(); form_data[this.state.key] = svgCanvas.getSvgString();
this.state.value = form_data[this.state.key] this.state.value = form_data[this.state.key];
return form_data; return form_data;
}, {mutex: 'statechange'}); }, {mutex: 'statechange'});
......
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