mirror of
https://github.com/logseq/logseq.git
synced 2026-05-28 14:39:48 +00:00
fix: a strange Reaction error issue
This commit is contained in:
@@ -42,7 +42,6 @@ export class TLPage<S extends TLShape = TLShape, E extends TLEventMap = TLEventM
|
||||
shapes: toJS(this.shapes.map(shape => toJS(shape.props))),
|
||||
bindings: toJS(this.bindings),
|
||||
nonce: this.nonce,
|
||||
editingShape: toJS(this.app.editingShape),
|
||||
}),
|
||||
(curr, prev) => {
|
||||
if (this.app.isInAny('creating')) return
|
||||
|
||||
@@ -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.')
|
||||
|
||||
Reference in New Issue
Block a user