Changeset 35770


Ignore:
Timestamp:
2021-12-08T13:26:51+13:00 (2 years ago)
Author:
cstephen
Message:

Fix bundle resolution and imports

Location:
main/trunk/model-interfaces-dev/atea/ocr
Files:
2 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-interfaces-dev/atea/ocr/src/components/EditPage.vue

    r35762 r35770  
    1010    <div class="image-panel">
    1111        <div class="image-container" :style="{ transform: transformString }">
    12             <img v-if="rotateMode" src="images/rotate-arrow.svg" class="rotate-handle rotate-tl" @mousedown="allowRotation = true" draggable="false" />
    13             <img v-if="rotateMode" src="images/rotate-arrow.svg" class="rotate-handle rotate-tr" @mousedown="allowRotation = true" draggable="false" />
    14             <img v-if="rotateMode" src="images/rotate-arrow.svg" class="rotate-handle rotate-bl" @mousedown="allowRotation = true" draggable="false" />
    15             <img v-if="rotateMode" src="images/rotate-arrow.svg" class="rotate-handle rotate-br" @mousedown="allowRotation = true" draggable="false" />
     12            <img v-if="rotateMode" src="../assets/rotate-arrow.svg" class="rotate-handle rotate-tl" @mousedown="allowRotation = true" draggable="false" />
     13            <img v-if="rotateMode" src="../assets/rotate-arrow.svg" class="rotate-handle rotate-tr" @mousedown="allowRotation = true" draggable="false" />
     14            <img v-if="rotateMode" src="../assets/rotate-arrow.svg" class="rotate-handle rotate-bl" @mousedown="allowRotation = true" draggable="false" />
     15            <img v-if="rotateMode" src="../assets/rotate-arrow.svg" class="rotate-handle rotate-br" @mousedown="allowRotation = true" draggable="false" />
    1616
    1717            <table v-if="rotateMode" class="rotate-guide" :style="{ transform: transformStringInverted }">
     
    230230        },
    231231        async closeAndSave() {
    232             const Jimp = await import("jimp/es");
     232            const { default: Jimp } = await import("jimp/es");
    233233
    234234            const buffer = Buffer.from(this.imageBuffer);
  • main/trunk/model-interfaces-dev/atea/ocr/src/js/OcrService.js

    r35769 r35770  
    7474        /** @type {String} The URL to which query POST requests should be made. */
    7575        if (process.env.NODE_ENV !== "production") {
    76             this.queryUrl = "//localhost:8383/gs3-atea-ocr/";
     76            this.rootQueryUrl = "//localhost:8383/gs3-atea-ocr/";
    7777        }
    7878        else {
    79             this.queryUrl = "/gs3-atea-ocr/tesseract";
     79            this.rootQueryUrl = "/gs3-atea-ocr/";
    8080        }
    8181    }
     
    8888    async run(images)
    8989    {
    90         const queryUrl = this.queryUrl + "tesseract";
     90        const queryUrl = this.rootQueryUrl + "tesseract";
    9191
    9292        try
     
    135135    async getThresholdedImage(key)
    136136    {
    137         const queryUrl = this.queryUrl + `image?key=${key}`;
     137        const queryUrl = this.rootQueryUrl + `image?key=${key}`;
    138138
    139139        try
  • main/trunk/model-interfaces-dev/atea/ocr/vue.config.js

    r35734 r35770  
    55 */
    66module.exports = {
    7     // publicPath: "interfaces/atea/ocr/dist",
    8     filenameHashing: false, // Allows us to easily setup direct links to the bundles in ocr.xsl. You may want to change this for production in order to help with caching
     7    filenameHashing: false, // Allows us to easily setup direct links to the bundles in macron-restoration.xsl. You may want to change this for production in order to help with caching
     8    publicPath: process.env.NODE_ENV === 'production'
     9        ? '/greenstone3/interfaces/atea/ocr/dist'
     10        : '/',
    911
    1012    chainWebpack: config => {
Note: See TracChangeset for help on using the changeset viewer.