Commit a3f364c5bb2f1e41b5919847009439de64359720
Readablility fixes to swtmaker.js
| | | | 305 | inputStore: function(opt) { | 305 | inputStore: function(opt) { |
---|
306 | var temp = opt; | 306 | var temp = opt; |
---|
307 | var src = $('#img-url-input').val(); | 307 | var src = $('#img-url-input').val(); |
---|
308 | 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}; |
---|
| | 308 | this.newanno = {'src':src, | | | 309 | 'text':temp, |
---|
| | 310 | 'shapes': [ |
---|
| | 311 | {'type':annotation.shape.type, |
---|
| | 312 | 'geometry':{'x':annotation.shape.geometry.x, |
---|
| | 313 | 'y':annotation.shape.geometry.y, |
---|
| | 314 | 'width':annotation.shape.geometry.width, |
---|
| | 315 | 'height':annotation.shape.geometry.height} |
---|
| | 316 | }], |
---|
| | 317 | 'context':window.location.origin}; |
---|
309 | | 318 | |
---|
310 | }, | 319 | }, |
---|
311 | | 320 | |
---|
… | | … | |
---|
323 | //save button - event bind | 323 | //save button - event bind |
---|
324 | add_new_anno: function(event){ | 324 | add_new_anno: function(event){ |
---|
325 | var $selected = $('select option:selected'); | 325 | var $selected = $('select option:selected'); |
---|
326 | var tempinput = $selected.text()+': '+$('.annotorious-editor textarea').val(); | | var tempinput = $selected.text()+': '+$('.annotorious-editor textarea').val(); |
---|
| | 326 | var tempinput = $selected.text() + ': ' + $('.annotorious-editor textarea').val(); | 327 | this.newanno.text.push(tempinput); | 327 | this.newanno.text.push(tempinput); |
---|
328 | var newinput = this.newanno.text.toString(); | 328 | var newinput = this.newanno.text.toString(); |
---|
329 | this.newanno.text = newinput; | 329 | this.newanno.text = newinput; |
---|