Skip to content

Commit

Permalink
Merge pull request #280 from recogito/rs/annotorious-library-downgrade
Browse files Browse the repository at this point in the history
Bugfix: Issue 320
  • Loading branch information
lwjameson authored Oct 8, 2024
2 parents 5d8a1c8 + a7dada5 commit bc5e820
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"linkedom": "0.18.5",
"moment": "^2.30.1",
"nodemailer": "^6.9.15",
"openseadragon": "4.1.1",
"openseadragon": "4.0.0",
"papaparse": "5.4.1",
"quill": "2.0.2",
"react": "^18.3.1",
Expand Down
6 changes: 3 additions & 3 deletions src/apps/annotation-image/AnnotatedImage/AnnotatedImage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
import { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import type OpenSeadragon from 'openseadragon';
import { UndoStack } from '@components/AnnotationDesktop';
import type { PrivacyMode } from '@components/PrivacySelector';
Expand Down Expand Up @@ -101,7 +101,7 @@ export const AnnotatedImage = forwardRef<OpenSeadragon.Viewer, AnnotatedImagePro
preserveImageSizeOnResize: true
}), [props.imageManifestURL]);

const selectAction = (annotation: SupabaseAnnotation) => {
const selectAction = useCallback((annotation: SupabaseAnnotation) => {
// Directly after creation, annotations have no
// layer_id (because it gets added later through
// the storage plugin).
Expand All @@ -116,7 +116,7 @@ export const AnnotatedImage = forwardRef<OpenSeadragon.Viewer, AnnotatedImagePro
annotation.target.creator?.id === me?.id || policies.get('layers').has('INSERT'));

return canEdit ? UserSelectAction.EDIT : UserSelectAction.SELECT;
}
}, [annoRef, props.activeLayer, policies]);

useEffect(() => {
if (props.tool) {
Expand Down

0 comments on commit bc5e820

Please sign in to comment.