diff --git a/src/common/annotation-manager.js b/src/common/annotation-manager.js index d7f1cfb7..183d9210 100644 --- a/src/common/annotation-manager.js +++ b/src/common/annotation-manager.js @@ -6,8 +6,8 @@ import { postApi } from '../custom/utils/apiFetch' let api = ''; if (process.env.NODE_ENV === 'development'){ - //api = 'https://be.yeondoo.net' - api = 'https://virtserver.swaggerhub.com/SYLEELSW_1/Yeondoo/2.0' + api = 'https://be.yeondoo.net' + //api = 'https://virtserver.swaggerhub.com/SYLEELSW_1/Yeondoo/2.0' } else if (process.env.NODE_ENV === 'production'){ api = `${process.env.VITE_REACT_APP_AWS_SERVER}` diff --git a/src/index.dev.js b/src/index.dev.js index c6ca7ea9..a1480268 100644 --- a/src/index.dev.js +++ b/src/index.dev.js @@ -10,8 +10,8 @@ window.dev = true; let api = ''; if (process.env.NODE_ENV === 'development'){ - //api = 'https://be.yeondoo.net' - api = 'https://virtserver.swaggerhub.com/SYLEELSW_1/Yeondoo/2.0' + api = 'https://be.yeondoo.net' + //api = 'https://virtserver.swaggerhub.com/SYLEELSW_1/Yeondoo/2.0' } else if (process.env.NODE_ENV === 'production'){ api = `${process.env.VITE_REACT_APP_AWS_SERVER}` @@ -70,6 +70,10 @@ const receiveBasicInfo = async(e) => { //createReader(paperId, [...paperItemsWithTag, e.data.chatNote]) } + // if (e.data.needPaperIndex) { + // reader. + // window.parent.postMessage({pageIndex: 0}, '*') + // } } window.addEventListener("message", receiveBasicInfo); @@ -155,6 +159,9 @@ async function createReader(paperId, paperItems) { console.log('Delete annotations', JSON.stringify(ids)); }, onChangeViewState: function (state, primary) { + if (state){ + window.parent.postMessage({pageIndex: state.pageIndex}, '*') + } console.log('Set state', state, primary); }, onOpenTagsPopup(annotationID, left, top) {