|
@@ -2,7 +2,6 @@ import * as React from 'react'
|
|
|
import { observer } from 'mobx-react-lite'
|
|
|
import { TLBounds, BoundsUtils, TLOffset } from '@tldraw/core'
|
|
|
import { useRendererContext, useCounterScaledPosition } from '../../hooks'
|
|
|
-import { useDebouncedValue } from '../../hooks/useDebounced'
|
|
|
import type { TLReactShape } from '../../lib'
|
|
|
|
|
|
const stopEventPropagation = (e: React.PointerEvent) => e.stopPropagation()
|
|
@@ -16,7 +15,7 @@ export interface TLContextBarContainerProps<S extends TLReactShape> {
|
|
|
|
|
|
export const ContextBarContainer = observer(function ContextBarContainer<S extends TLReactShape>({
|
|
|
shapes,
|
|
|
- hidden: _hidden,
|
|
|
+ hidden,
|
|
|
bounds,
|
|
|
rotation = 0,
|
|
|
}: TLContextBarContainerProps<S>) {
|
|
@@ -35,8 +34,6 @@ export const ContextBarContainer = observer(function ContextBarContainer<S exten
|
|
|
const rotatedBounds = BoundsUtils.getRotatedBounds(bounds, rotation)
|
|
|
const scaledBounds = BoundsUtils.multiplyBounds(rotatedBounds, zoom)
|
|
|
|
|
|
- const hidden = useDebouncedValue(_hidden, 200)
|
|
|
-
|
|
|
useCounterScaledPosition(rBounds, bounds, rotation, 10003)
|
|
|
|
|
|
if (!ContextBar) throw Error('Expected a ContextBar component.')
|