UNPKG

@saran-ign/video-annotation-tool

Version:

[![npm version](https://img.shields.io/npm/v/@saran-ign/video-annotation-tool.svg)](https://www.npmjs.com/package/@saran-ign/video-annotation-tool) [![npm downloads](https://img.shields.io/npm/dm/@saran-ign/video-annotation-tool.svg)](https://www.npmjs.co

6 lines (5 loc) 989 B
import { jsx as _jsx } from "react/jsx-runtime"; import { forwardRef } from "react"; import { Circle } from "react-konva"; export const CircleShape = forwardRef(({ properties, scaleX, scaleY, color, draggable, onClick, onDragEnd, onDragStart, onTransformEnd, onTransformStart, onDragMove, dragBoundFunc, currentWidth, currentHeight, onMouseEnter, }, ref) => (_jsx(Circle, { ref: ref, x: properties.x * (currentWidth / properties.screenWidth), y: properties.y * (currentHeight / properties.screenHeight), radius: properties.radius * (currentWidth / properties.screenWidth), stroke: color, strokeWidth: properties.strokeWidth || 2, opacity: properties.opacity || 1, draggable: draggable, onClick: onClick, onDragEnd: onDragEnd, onDragStart: onDragStart, onDragMove: onDragMove, onMouseEnter: onMouseEnter, dragBoundFunc: dragBoundFunc, onTransformStart: onTransformStart, onTransformEnd: onTransformEnd }))); CircleShape.displayName = "CircleShape"; // Set display name for better debugging