From a3f364c5bb2f1e41b5919847009439de64359720 Mon Sep 17 00:00:00 2001 From: Arvind Date: Thu, 5 Jun 2014 15:33:39 +0530 Subject: [PATCH] Readablility fixes to swtmaker.js --- swtr/static/js/swtmaker.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/swtr/static/js/swtmaker.js b/swtr/static/js/swtmaker.js index 812051c..cf092b3 100644 --- a/swtr/static/js/swtmaker.js +++ b/swtr/static/js/swtmaker.js @@ -305,7 +305,16 @@ inputStore: function(opt) { var temp = opt; var src = $('#img-url-input').val(); - this.newanno = {'src':src, 'text':temp, 'shapes': [{'type':annotation.shape.type, 'geometry':{'x':annotation.shape.geometry.x, 'y':annotation.shape.geometry.y, 'width':annotation.shape.geometry.width, 'height':annotation.shape.geometry.height}},], 'context':window.location.origin}; + this.newanno = {'src':src, + 'text':temp, + 'shapes': [ + {'type':annotation.shape.type, + 'geometry':{'x':annotation.shape.geometry.x, + 'y':annotation.shape.geometry.y, + 'width':annotation.shape.geometry.width, + 'height':annotation.shape.geometry.height} + }], + 'context':window.location.origin}; }, @@ -314,7 +323,7 @@ //save button - event bind add_new_anno: function(event){ var $selected = $('select option:selected'); - var tempinput = $selected.text()+': '+$('.annotorious-editor textarea').val(); + var tempinput = $selected.text() + ': ' + $('.annotorious-editor textarea').val(); this.newanno.text.push(tempinput); var newinput = this.newanno.text.toString(); this.newanno.text = newinput; -- 1.7.10.4