Restore context menu

This commit is contained in:
Steve Ruiz 2021-10-14 14:28:37 +01:00
parent d95a2e83a0
commit 0183a4d5a2

View file

@ -215,70 +215,70 @@ function InnerTldraw({
<div ref={rWrapper} tabIndex={0}> <div ref={rWrapper} tabIndex={0}>
<div className={layout()}> <div className={layout()}>
<OneOff focusableRef={rWrapper} autofocus={autofocus} /> <OneOff focusableRef={rWrapper} autofocus={autofocus} />
{/* <ContextMenu> */} <ContextMenu>
<Renderer <Renderer
id={id} id={id}
containerRef={rWrapper} containerRef={rWrapper}
page={page} page={page}
pageState={pageState} pageState={pageState}
users={users} users={users}
userId={tlstate.state.room?.userId} userId={tlstate.state.room?.userId}
shapeUtils={tldrawShapeUtils} shapeUtils={tldrawShapeUtils}
theme={theme} theme={theme}
meta={meta} meta={meta}
hideBounds={hideBounds} hideBounds={hideBounds}
hideHandles={hideHandles} hideHandles={hideHandles}
hideIndicators={hideIndicators} hideIndicators={hideIndicators}
onPinchStart={tlstate.onPinchStart} onPinchStart={tlstate.onPinchStart}
onPinchEnd={tlstate.onPinchEnd} onPinchEnd={tlstate.onPinchEnd}
onPinch={tlstate.onPinch} onPinch={tlstate.onPinch}
onPan={tlstate.onPan} onPan={tlstate.onPan}
onZoom={tlstate.onZoom} onZoom={tlstate.onZoom}
onPointerDown={tlstate.onPointerDown} onPointerDown={tlstate.onPointerDown}
onPointerMove={tlstate.onPointerMove} onPointerMove={tlstate.onPointerMove}
onPointerUp={tlstate.onPointerUp} onPointerUp={tlstate.onPointerUp}
onPointCanvas={tlstate.onPointCanvas} onPointCanvas={tlstate.onPointCanvas}
onDoubleClickCanvas={tlstate.onDoubleClickCanvas} onDoubleClickCanvas={tlstate.onDoubleClickCanvas}
onRightPointCanvas={tlstate.onRightPointCanvas} onRightPointCanvas={tlstate.onRightPointCanvas}
onDragCanvas={tlstate.onDragCanvas} onDragCanvas={tlstate.onDragCanvas}
onReleaseCanvas={tlstate.onReleaseCanvas} onReleaseCanvas={tlstate.onReleaseCanvas}
onPointShape={tlstate.onPointShape} onPointShape={tlstate.onPointShape}
onDoubleClickShape={tlstate.onDoubleClickShape} onDoubleClickShape={tlstate.onDoubleClickShape}
onRightPointShape={tlstate.onRightPointShape} onRightPointShape={tlstate.onRightPointShape}
onDragShape={tlstate.onDragShape} onDragShape={tlstate.onDragShape}
onHoverShape={tlstate.onHoverShape} onHoverShape={tlstate.onHoverShape}
onUnhoverShape={tlstate.onUnhoverShape} onUnhoverShape={tlstate.onUnhoverShape}
onReleaseShape={tlstate.onReleaseShape} onReleaseShape={tlstate.onReleaseShape}
onPointBounds={tlstate.onPointBounds} onPointBounds={tlstate.onPointBounds}
onDoubleClickBounds={tlstate.onDoubleClickBounds} onDoubleClickBounds={tlstate.onDoubleClickBounds}
onRightPointBounds={tlstate.onRightPointBounds} onRightPointBounds={tlstate.onRightPointBounds}
onDragBounds={tlstate.onDragBounds} onDragBounds={tlstate.onDragBounds}
onHoverBounds={tlstate.onHoverBounds} onHoverBounds={tlstate.onHoverBounds}
onUnhoverBounds={tlstate.onUnhoverBounds} onUnhoverBounds={tlstate.onUnhoverBounds}
onReleaseBounds={tlstate.onReleaseBounds} onReleaseBounds={tlstate.onReleaseBounds}
onPointBoundsHandle={tlstate.onPointBoundsHandle} onPointBoundsHandle={tlstate.onPointBoundsHandle}
onDoubleClickBoundsHandle={tlstate.onDoubleClickBoundsHandle} onDoubleClickBoundsHandle={tlstate.onDoubleClickBoundsHandle}
onRightPointBoundsHandle={tlstate.onRightPointBoundsHandle} onRightPointBoundsHandle={tlstate.onRightPointBoundsHandle}
onDragBoundsHandle={tlstate.onDragBoundsHandle} onDragBoundsHandle={tlstate.onDragBoundsHandle}
onHoverBoundsHandle={tlstate.onHoverBoundsHandle} onHoverBoundsHandle={tlstate.onHoverBoundsHandle}
onUnhoverBoundsHandle={tlstate.onUnhoverBoundsHandle} onUnhoverBoundsHandle={tlstate.onUnhoverBoundsHandle}
onReleaseBoundsHandle={tlstate.onReleaseBoundsHandle} onReleaseBoundsHandle={tlstate.onReleaseBoundsHandle}
onPointHandle={tlstate.onPointHandle} onPointHandle={tlstate.onPointHandle}
onDoubleClickHandle={tlstate.onDoubleClickHandle} onDoubleClickHandle={tlstate.onDoubleClickHandle}
onRightPointHandle={tlstate.onRightPointHandle} onRightPointHandle={tlstate.onRightPointHandle}
onDragHandle={tlstate.onDragHandle} onDragHandle={tlstate.onDragHandle}
onHoverHandle={tlstate.onHoverHandle} onHoverHandle={tlstate.onHoverHandle}
onUnhoverHandle={tlstate.onUnhoverHandle} onUnhoverHandle={tlstate.onUnhoverHandle}
onReleaseHandle={tlstate.onReleaseHandle} onReleaseHandle={tlstate.onReleaseHandle}
onError={tlstate.onError} onError={tlstate.onError}
onRenderCountChange={tlstate.onRenderCountChange} onRenderCountChange={tlstate.onRenderCountChange}
onShapeChange={tlstate.onShapeChange} onShapeChange={tlstate.onShapeChange}
onShapeBlur={tlstate.onShapeBlur} onShapeBlur={tlstate.onShapeBlur}
onBoundsChange={tlstate.updateBounds} onBoundsChange={tlstate.updateBounds}
onKeyDown={tlstate.onKeyDown} onKeyDown={tlstate.onKeyDown}
onKeyUp={tlstate.onKeyUp} onKeyUp={tlstate.onKeyUp}
/> />
{/* </ContextMenu> */} </ContextMenu>
<div className={ui()}> <div className={ui()}>
{isFocusMode ? ( {isFocusMode ? (
<div className={unfocusButton()}> <div className={unfocusButton()}>