Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## v1.6.6 (31/03/2025)

### Changes

- :children_crossing: updated to support dragging on shapes in annotation viewer

## v1.6.5 (16/10/2023)

### Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-mindee-js",
"version": "1.6.5",
"version": "1.6.6",
"description": "Front-End Computer Vision SDK for React",
"author": "@mindee",
"license": "MIT",
Expand Down
6 changes: 6 additions & 0 deletions src/components/AnnotationViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ export default function AnnotationViewer({
onShapeMultiSelect,
),
)

stageObject.current.on('dragstart', () => {
if (stageObject.current?.container()) {
stageObject.current.container().style.cursor = 'grabbing'
}
})
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const bindEventToPolygon = (
) => {
const stage = polygon.getStage()
const shape = polygon.getAttr('shape')
polygon.on('mousedown', (event) => {
polygon.on('mouseup', (event) => {
event.cancelBubble = true
onClick?.(shape)
options?.onClick?.(polygon)
Expand Down