Skip to content

Commit

Permalink
Merge pull request #1085 from girder/slideatlas-by-reference
Browse files Browse the repository at this point in the history
Stop packaging the slideatlas viewer directly.
  • Loading branch information
manthey authored Mar 17, 2023
2 parents 732b33f + 115f762 commit d4b8b5d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
- Increase size of annotation json that will be parsed ([#1075](../../pull/1075))
- Quote ETag tags ([#1084](../../pull/1084))

### Changes
-

## 1.20.1

### Bug Fixes
Expand Down
1 change: 0 additions & 1 deletion girder/girder_large_image/web_client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"jsonlint-mod": "^1.7.6",
"js-yaml": "^4.1.0",
"sinon": "^2.1.0",
"slideatlas-viewer": "^4.4.1",
"webpack": "^2.7.0",
"yaml": "^2.1.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,20 @@ var SlideAtlasImageViewerWidget = ImageViewerWidget.extend({
return this.setTransform(1, 0, 0, 1, 0, 0);
};
}
let root = '/static/built';
try {
root = __webpack_public_path__ || root; // eslint-disable-line
} catch (err) { }
root = root.replace(/\/$/, '');
if (!$('head #large_image-slideatlas-css').length) {
$('head').prepend(
$('<link>', {
id: 'large_image-slideatlas-css',
rel: 'stylesheet',
href: root + '/plugins/large_image/extra/slideatlas/sa.css'
href: 'https://unpkg.com/slideatlas-viewer@%5e4.4.1/dist/sa.css'
})
);
}

$.when(
ImageViewerWidget.prototype.initialize.call(this, settings),
$.ajax({ // like $.getScript, but allow caching
url: root + '/plugins/large_image/extra/slideatlas/sa-all.max.js',
url: 'https://unpkg.com/slideatlas-viewer@%5e4.4.1/dist/sa-all.max.js',
dataType: 'script',
cache: true
}))
Expand Down
3 changes: 0 additions & 3 deletions girder/girder_large_image/web_client/webpack.helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ module.exports = function (config) {
from: require.resolve('geojs'),
to: path.join(config.output.path, 'extra', 'geojs.js'),
toType: 'file'
}, {
from: path.join(path.resolve(__dirname), 'node_modules', 'slideatlas-viewer', 'dist'),
to: path.join(config.output.path, 'extra', 'slideatlas')
}, {
from: path.join(path.resolve(__dirname), 'node_modules', 'sinon', 'pkg', 'sinon.js'),
to: path.join(config.output.path, 'extra', 'sinon.js')
Expand Down

0 comments on commit d4b8b5d

Please sign in to comment.