kopia lustrzana https://github.com/Tldraw/Tldraw
Add back the old check.
rodzic
54fd4c587d
commit
7a8e7c9a18
|
@ -85,7 +85,10 @@ export function DefaultMinimap() {
|
|||
const commonBounds = Box.Common([editor.getCurrentPageBounds() ?? new Box(), _vpPageBounds])
|
||||
|
||||
// If we clicked inside of the allowed area, but outside of the viewport, we wish to move the camera
|
||||
if (commonBounds.containsPoint(point) && !_vpPageBounds.containsPoint(point)) {
|
||||
if (
|
||||
(commonBounds.containsPoint(point) && !_vpPageBounds.containsPoint(point)) ||
|
||||
!minimapRef.current.isInViewport
|
||||
) {
|
||||
const delta = Vec.Sub(_vpPageBounds.center, _vpPageBounds.point)
|
||||
const pagePoint = Vec.Add(point, delta)
|
||||
minimapRef.current.originPagePoint.setTo(pagePoint)
|
||||
|
|
Ładowanie…
Reference in New Issue