mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
cleanup
This commit is contained in:
parent
cb07aa9fb0
commit
8adf64acb9
6 changed files with 94 additions and 355 deletions
|
@ -11,6 +11,7 @@ import { MapContainer } from '~/constants/map';
|
|||
interface IProps {
|
||||
map: MapContainer;
|
||||
sticker: IStickerDump;
|
||||
onDragStart?: () => void;
|
||||
index: number;
|
||||
is_editing: boolean;
|
||||
|
||||
|
@ -53,7 +54,12 @@ const Sticker: React.FC<IProps> = ({
|
|||
setDragging(true);
|
||||
}, [setDragging, layer, map]);
|
||||
|
||||
const onDragStop = React.useCallback(() => {
|
||||
const onDragStop = React.useCallback(event => {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
if (!layer) return;
|
||||
|
||||
setDragging(false);
|
||||
onChange({
|
||||
...sticker,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue