From 22d9d92369b4c3704761b5470b94c39ee7cf2652 Mon Sep 17 00:00:00 2001 From: rlx Date: Fri, 1 Feb 2019 14:42:34 +0530 Subject: [PATCH] fix position separator --- txt.js/txt.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/txt.js/txt.js b/txt.js/txt.js index 3381906..bf90f9d 100644 --- a/txt.js/txt.js +++ b/txt.js/txt.js @@ -218,12 +218,16 @@ txtjs.noteExists = function(note) { } txtjs.onMessage = function(data, event) { + console.log('onMessage', event, data) if (event == 'selectAnnotation') { txtjs.selectNote(data.id, false) } else if (event == 'addAnnotation') { txtjs.addNoteFromSelection() } else if (event == 'addAnnotations') { data.annotations.forEach(function(note) { + //// + note.position = note.position.replace(':', ',') + //// txtjs.renderNote(note) txtjs.notes.push(note) }) @@ -235,7 +239,6 @@ txtjs.onMessage = function(data, event) { txtjs.postMessage = function(action, data) { console.log('postMessage', action, data) - //parent.postMessage(JSON.stringify({action: action, data: data}), '*') Ox.$parent.postMessage(action.replace('Note', 'Annotation'), data) }