From 3fa1fd1749a9fa422bc961999bc2d9d87d6d4c84 Mon Sep 17 00:00:00 2001 From: andr3ina Date: Thu, 12 Jun 2014 13:36:01 -0700 Subject: [PATCH] Fix problem when erasing and saving When using the erase button the line would be erased visually, but it wouldn't update the array with the strokes. --- javascripts/raphael.sketchpad.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/javascripts/raphael.sketchpad.js b/javascripts/raphael.sketchpad.js index 927eb86..68fcd7b 100644 --- a/javascripts/raphael.sketchpad.js +++ b/javascripts/raphael.sketchpad.js @@ -366,6 +366,7 @@ if (_options.editing == "erase") { var stroke = this.attr(); stroke.type = this.type; + var strokeid = this.id; _action_history.add({ type: "erase", @@ -379,6 +380,9 @@ } } + //REMOVE STROKE FROM ARRAY + _strokes.splice(stroke_id, 1); + _fire_change(); this.remove(); @@ -908,4 +912,4 @@ var equiv = function () { return innerEquiv; -}(); \ No newline at end of file +}();