Commit a3f364c5bb2f1e41b5919847009439de64359720
- Diff rendering mode:
- inline
- side by side
swtr/static/js/swtmaker.js
(11 / 2)
  | |||
305 | 305 | inputStore: function(opt) { | |
306 | 306 | var temp = opt; | |
307 | 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}; | ||
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 | 323 | //save button - event bind | |
324 | 324 | add_new_anno: function(event){ | |
325 | 325 | var $selected = $('select option:selected'); | |
326 | var tempinput = $selected.text()+': '+$('.annotorious-editor textarea').val(); | ||
326 | var tempinput = $selected.text() + ': ' + $('.annotorious-editor textarea').val(); | ||
327 | 327 | this.newanno.text.push(tempinput); | |
328 | 328 | var newinput = this.newanno.text.toString(); | |
329 | 329 | this.newanno.text = newinput; |