Skip to content

Commit 9aee3d1

Browse files
biharckswederik
authored andcommitted
feat(updateSize): Add updateSize function to allow redrawing when the canvas size changes (#30)
* adding updateSize function * making updatesize cleaner
1 parent 63a2f96 commit 9aee3d1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/api.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import {
4141

4242
import DICOMwebClient from 'dicomweb-client/build/dicomweb-client.js'
4343

44-
4544
function _getPixelSpacing(metadata) {
4645
const functionalGroup = metadata.SharedFunctionalGroupsSequence[0];
4746
const pixelMeasures = functionalGroup.PixelMeasuresSequence[0];
@@ -697,6 +696,11 @@ class VLWholeSlideMicroscopyImageViewer {
697696

698697
}
699698

699+
resize(){
700+
this[_map].updateSize();
701+
}
702+
703+
700704
/* Renders the images.
701705
*/
702706
render(options) {

0 commit comments

Comments
 (0)