Skip to content

Commit

Permalink
Changed vendor scripts in asset_detail to be modules. Moved explicit …
Browse files Browse the repository at this point in the history
…split.js import to viewer-split.js and removed script tag for it.
  • Loading branch information
joshuastegmaier committed Aug 14, 2024
1 parent 30382aa commit 7066546
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
15 changes: 7 additions & 8 deletions concordia/static/js/src/viewer-split.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* global Split */

import {seadragonViewer} from './viewer.js';
import Split from '/static/split.js/dist/split.es.js';

let pageSplit;
let contributeContainer = document.getElementById('contribute-container');
Expand Down Expand Up @@ -109,6 +108,12 @@ function horizontalSplit() {
});
}

if (splitDirection == 'v') {
pageSplit = verticalSplit();
} else {
pageSplit = horizontalSplit();
}

document
.getElementById('viewer-layout-horizontal')
.addEventListener('click', function () {
Expand Down Expand Up @@ -140,9 +145,3 @@ document
}, 10);
}
});

if (splitDirection == 'v') {
pageSplit = verticalSplit();
} else {
pageSplit = horizontalSplit();
}
5 changes: 2 additions & 3 deletions concordia/templates/transcriptions/asset_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
data-tile-source-url="{% asset_media_url asset %}?canvas"
></script>

<script defer src="{% static 'split.js/dist/split.min.js' %}"></script>
<script defer src="{% static 'openseadragon/build/openseadragon/openseadragon.min.js' %}"></script>
<script defer src="{% static 'openseadragon-filtering/openseadragon-filtering.js' %}"></script>
<script module src="{% static 'openseadragon/build/openseadragon/openseadragon.min.js' %}"></script>
<script module src="{% static 'openseadragon-filtering/openseadragon-filtering.js' %}"></script>

<script type="module" src="{% static 'js/contribute.js' %}"></script>
<script type="module" src="{% static 'js/viewer-split.js' %}"></script>
Expand Down

0 comments on commit 7066546

Please sign in to comment.