Skip to content

Commit

Permalink
#3718 - Lazy values no longer work in lower part of curation page
Browse files Browse the repository at this point in the history
- Fix ability to merge annotation on curation page again
  • Loading branch information
reckart committed Feb 17, 2023
1 parent ec37310 commit 61f52a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions inception/inception-brat-editor/src/main/ts/src/util/Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,32 +494,32 @@ export class Util {
// docData: the document data (in the format of the result of
// http://.../brat/ajax.cgi?action=getDocument&collection=...&document=...
// returns the embedded visualizer's dispatcher object
embed (container: string, ajax: DiamAjax, collData, docData) {
embed (container: string, ajax: DiamAjax, collData, docData, callback?: Function) {
const dispatcher = new Dispatcher()

// eslint-disable-next-line no-new
new Visualizer(dispatcher, container)
// eslint-disable-next-line no-new
new VisualizerUI(dispatcher, ajax)
docData.collection = null
if (callback) callback(dispatcher)
dispatcher.post('collectionLoaded', [collData])
dispatcher.post('requestRenderData', [docData])
return dispatcher
}

// container: ID or jQuery element
// container: ID
// collDataURL: the URL of the collection data, or collection data
// object (if pre-fetched)
// docDataURL: the url of the document data (if pre-fetched, use
// simple `embed` instead)
// callback: optional; the callback to call afterwards; it will be
// passed the embedded visualizer's dispatcher object
embedByURL (container: string | JQuery, ajax: DiamAjax, collDataURL: string, docDataURL: string, callback?: Function) {
embedByURL (container: string, ajax: DiamAjax, collDataURL: string, docDataURL: string, callback?: Function) {
let collData, docData
const handler = () => {
if (collData && docData) {
const dispatcher = this.embed(container, ajax, collData, docData)
if (callback) callback(dispatcher)
this.embed(container, ajax, collData, docData, callback)
}
}
if (typeof (container) === 'string') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export class Visualizer {

const chunkElement = this.getChunkElementWithId(chunk.index)
if (chunkElement) {
console.log('Scrolling to ', chunkElement)
// console.log('Scrolling to ', chunkElement)
chunkElement.scrollIntoView({ behavior: 'smooth', block: 'center' })

this.svg.node.querySelectorAll('.ping').forEach((ping) => ping.remove())
Expand Down

0 comments on commit 61f52a5

Please sign in to comment.