タグ D&D 時の表示位置修正 (#268) #400
@@ -7,7 +7,7 @@ import { DndContext,
|
||||
useDroppable,
|
||||
useSensor,
|
||||
useSensors } from '@dnd-kit/core'
|
||||
import { restrictToWindowEdges } from '@dnd-kit/modifiers'
|
||||
import { restrictToWindowEdges, snapCenterToCursor } from '@dnd-kit/modifiers'
|
||||
import { useQueryClient } from '@tanstack/react-query'
|
||||
import { motion } from 'framer-motion'
|
||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||
@@ -359,8 +359,8 @@ const TagDetailSidebar: FC<Props> = ({ className, post, sp }) => {
|
||||
<TagSearch/>
|
||||
<DndContext
|
||||
sensors={sensors}
|
||||
collisionDetection={sp ? tagCollisionDetection : undefined}
|
||||
measuring={sp ? alwaysMeasureDroppables : undefined}
|
||||
collisionDetection={tagCollisionDetection}
|
||||
measuring={alwaysMeasureDroppables}
|
||||
onDragStart={e => {
|
||||
if (e.active.data.current?.kind === 'tag')
|
||||
{
|
||||
@@ -489,7 +489,7 @@ const TagDetailSidebar: FC<Props> = ({ className, post, sp }) => {
|
||||
</ul>
|
||||
</motion.div>)}
|
||||
|
||||
<DragOverlay adjustScale={false}>
|
||||
<DragOverlay adjustScale={false} modifiers={[snapCenterToCursor]}>
|
||||
<div className="pointer-events-none">
|
||||
{activeTagDrag != null && (() => {
|
||||
const tag = findTag (tags, activeTagDrag.tagId)
|
||||
|
||||
新しい課題から参照
ユーザをブロックする