tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
28
pulls
pipelines
added mouse handlers back to canvas
cozylittle.house
1 month ago
25c94662
4e8a2f10
+1
-5
1 changed file
expand all
collapse all
unified
split
components
Canvas.tsx
+1
-5
components/Canvas.tsx
···
399
399
return (
400
400
<div
401
401
ref={ref}
402
402
-
{...(!props.preview ? { ...longPressHandlers } : {})}
403
403
-
// {...(isMobile && permissions.write ? { ...dragHandlers } : {})}
402
402
+
{...(!props.preview ? { ...longPressHandlers, ...mouseHandlers } : {})}
404
403
id={props.preview ? undefined : elementId.block(props.entityID).container}
405
404
className={`canvasBlockWrapper absolute group/canvas-block will-change-transform rounded-lg flex items-stretch origin-center p-3 `}
406
405
style={{
···
411
410
transform,
412
411
}}
413
412
>
414
414
-
{/* the gripper show on hover, but longpress logic needs to be added for mobile*/}
415
413
{!props.preview && permissions.write && (
416
414
<Gripper isFocused={isFocused} {...dragHandlers} />
417
415
)}
418
416
419
419
-
{/*mouseHandlers are being added here so they don't interfere with the dragHandlers in the div above*/}
420
417
<div
421
418
className={` w-full ${dragDelta || widthHandle.dragDelta || rotateHandle.dragDelta ? "pointer-events-none" : ""} `}
422
422
-
{...(!props.preview ? { ...mouseHandlers } : {})}
423
419
>
424
420
<BaseBlock
425
421
{...blockProps}