'); lineDiv.append(''); lineDiv.append(getLineActionsElement()); return lineDiv; } function getLineActionsElement() { const lineActions = $(''); const undoAnchor = $(''); const insertLineAnchor = $(''); const removeLineAnchor = $(''); lineActions.append(undoAnchor); lineActions.append(insertLineAnchor); lineActions.append(removeLineAnchor); return lineActions; } function setPageText() { if ($('#ocrview_box.edit-mode:visible').length) { return; //Never reload OCR text in edit mode } const pageIdx = br.currentIndex(); if (typeof window.textCorrection !== 'undefined' && window.textCorrection.currentPageNumber === pageIdx) { return; //No need to reload OCR text if still on the current page } var page = $('#pagediv' + pageIdx).data(); var tabIdx = 0; var wordIdx = 0; if (page != null && !jQuery.isEmptyObject(page)) { var results = traversePage(page, null, function() { return true; }); window.textCorrection.init("", work.children.page[pageIdx].pid, work.children.page[pageIdx].form); const ocrViewBox = $('.ocr-widget #ocrview_box'); ocrViewBox.text(""); var linesNode = {lines:[]}; getLineTemplate().appendTo(ocrViewBox); $.each(results, function(index) { var lineIdx = index; wordIdx = 0; var line = document.createElement('p'); $(line).attr('id', this.id); $(line).attr('b', this.boundbox); var lineNode = { idx: lineIdx, id: this.id, b: this.boundbox, ws:[]}; var wordId = ""; let lineText = ""; $.each(this.words, function(index) { wordId = this.id; const space = ""; tabIdx++; wordIdx++; const wordEntry = { idx: wordIdx, w: this.text, id: wordId, b: this.boundbox }; $(lineNode)[0].ws.push(wordEntry); const wordText = this.text.replace(//g, ">") + (this.hypen ? "-" : ""); const word = "" + wordText + ""; tabIdx++; wordIdx++; $(line).append(space); $(line).append(word); lineText += wordText.replace(/</g, "<").replace(/>/g, ">") + " "; }); $(linesNode)[0].lines.push(lineNode); const space = ""; $(line).append(space); const editableLine = getNewLineDivElement(); const inputElement = editableLine.find('input'); inputElement.val(lineText).attr('data-text', lineText); inputElement.addClass('edit-text').removeClass('new-text'); $(line).append(editableLine); $(line).append(getPencilAnchorElement()); $('.ocr-widget #ocrview_box').append(line); }); window.textCorrection.currentPageNumber = pageIdx; var pageId = work.children.page[pageIdx].id; var workPid = $('#pagediv' + pageIdx)[0].attributes['workpid'].value; $('.ocr-widget #ocrview_box').append(" "); } else { setTimeout(function() { setPageText(); }, 100); }; } function isId(id, element) { return (id == element.id); } function isIn(point, element) { var box = element.b; if (point == null || box == null) { return true; } points = box.split(','); var x1 = points[0]; var y1 = points[1]; var x2 = points[2]; var y2 = points[3]; return (point.x > x1 && point.x < x2) && (point.y > y1 && point.y < y2); } // Highlights the word on the bookreader and creates a box for marking where you clicked. function drawBox(box,index) { box.div = document.createElement('div'); $(box.div).prop('className', 'BookReaderSearchHilite'); box.l = box[0] box.t = box[1] box.r = box[2] box.b = box[3] br.styleHighliteBox1Up(box, index); return box.div; } //creates a Textbox for search editing. function drawEditBox(ocr) { var boxdiv = document.createElement('input'); $(boxdiv).prop('type', 'text'); $(boxdiv).prop('className', 'ocrEditLine'); $(boxdiv).css({ opacity: 1, 'bakground color': 'white', position: 'absolute', width: (ocr.points[2] - ocr.points[0]) / br.reduce + 'px', height: (ocr.points[3] - ocr.points[1]) / br.reduce + 'px', left: (ocr.points[0]) / br.reduce + 'px', top: (ocr.points[3]) / br.reduce + 'px' }); $(boxdiv).val(ocr.words); return boxdiv; } function traversePage(page, target, testFunction) { let results = []; const printRegion = { print: page.print }; //this traverses the regions of the page, only the print space $.each(printRegion, function() { results = results.concat(traverseZone(this, target, testFunction)); }); return results; } function traverseZone(zone, target, testFunction) { var results = []; $.each(zone, function(k, v) { if (k == 'zs') { // Zone $.each(v, function(zone) { results = results.concat(traverseZone(this, target, testFunction)); }); } else if (k == 'ps') { // Paragraph $.each(v, function(para) { var paraResult = traversePara(this, target, testFunction); if (paraResult != null) { $.each(paraResult, function(index) { results.push(this); }); }; }); } else if ($.isArray(zone)) { // Zone is an array so k is the index results = results.concat(traverseZone(v, target, testFunction)); } }); return results; } function traversePara(para, target, testFunction) { var newlineResult = []; if (para.ls != null) { $.each(para.ls, function(line) { if (this != null && testFunction(target, this)) { var line = []; // word level span var wordsResult = traverseWord(this, target, testFunction); line.words = wordsResult; line.points = this.b.split(','); line.boundbox = this.b; line.id = this.id; newlineResult.push(line); }; }); }; return newlineResult; } function traverseWord(line, target, testFunction) { var wordsResult = []; if (line.ws != null) { $.each(line.ws, function(word) { if (this != null && testFunction(target, this)) { // if (this != null) { var word = []; //iterate down to have each word wrapped in its own span if (this.id != null) { word.id = this.id; word.points = this.b.split(','); word.boundbox = this.b; } word.text = this.w; if (this.fw) { word.hypen = true; } wordsResult.push(word); }; }); }; return wordsResult; } $( document ).ready(function() { addOcrViewListeners(); $('#BookReader').on('loaded', function() { if (br.mode == br.constModeThumb || br.mode == br.constMode2up) { hidePageTextAndDisplayMessage(); attachEventToDisplayTextOnThumbnailClick(); } }); }); http://nla.gov.au/nla.obj-3367562145 Buninyong & District Community Association, issuing body. (1986). Buninyong and district community news Retrieved September 3, 2024, from http://nla.gov.au/nla.obj-3367562145 Buninyong & District Community Association, issuing body. Buninyong and district community news [Buninyong, Vic.]: Buningyong and District Community News, 1986. Web. 3 September 2024 <http://nla.gov.au/nla.obj-3367562145> Buninyong & District Community Association, issuing body. 1986, Buninyong and district community news Buningyong and District Community News, [Buninyong, Vic.] viewed 3 September 2024 http://nla.gov.au/nla.obj-3367562145 {{Citation Citations are automatically generated and may require some modification to conform to exact standards. Select the images you want to download, or the whole document. We're generating your download. It should start shortly... ' + downloadButtonLabel + 'Cite
| author1=Buninyong & District Community Association, issuing body.
| title=Buninyong and district community news
| year=1986
| section=volumes ; 30 cm.
| issue=Edition 340, May 2008
| location=[Buninyong, Vic.]
| publisher=Buningyong and District Community News
| url=http://nla.gov.au/nla.obj-3367562145
| id=nla.obj-3367562145
| access-date=3 September 2024
| via=Trove
}} Download
Order
You can order a copy of this work from Copies Direct.
Copies Direct supplies reproductions of collection material for a fee. This service is offered by the National Library of Australia
What can I do with this?
Copyright varies by issue and article
- Reason for copyright status
- Serials have an open range of dates.
Copyright varies with each issue and article. You may have full rights to copy, or may be able to copy only under some circ*mstances, for example a portion for research or study. Order a copy where circ*mstances allow or Contact us for further information.
Copyright status was determined using the following information:
- Material type
- Literary Dramatic Musical
Copyright status may not be correct if data in the record is incomplete or inaccurate. Other access conditions may also apply.
For more information please see: Copyright in library collections.
Previous Next