isEditor && setIsHovered(true)}
- onMouseLeave={() => isEditor && setIsHovered(false)}
- onClick={(e) => {
- if (isEditor && !isEditing) {
- e.stopPropagation()
- setIsEditing(true)
- }
}}>
- {isEditing ? (
-
setEditValue(e.target.value)}
- onKeyDown={handleKeyDown}
- onBlur={handleSave}
- placeholder="Zone"
- style={{
- background: 'transparent',
- color: 'white',
- textShadow: 'inherit',
- border: 'none',
- borderBottom: '1px solid white',
- outline: 'none',
- padding: 0,
- margin: 0,
- fontSize: 'inherit',
- fontFamily: 'inherit',
- width: `${Math.max(editValue.length, 4) + 1}ch`,
- minWidth: '50px',
- textAlign: 'center'
- }}
- onClick={(e) => e.stopPropagation()}
- onDoubleClick={(e) => e.stopPropagation()}
- />
- ) : (
- <>
-
{node.name}
- {isEditor && (
-
- )}
- >
- )}
+
{node.name}
{/* Floor fill */}
diff --git a/packages/viewer/src/components/viewer/index.tsx b/packages/viewer/src/components/viewer/index.tsx
index 2b144668..4840125c 100644
--- a/packages/viewer/src/components/viewer/index.tsx
+++ b/packages/viewer/src/components/viewer/index.tsx
@@ -11,7 +11,7 @@ import {
} from '@pascal-app/core'
import { Bvh } from '@react-three/drei'
import { Canvas, extend, type ThreeToJSXElements, useFrame } from '@react-three/fiber'
-import { useEffect, useMemo, useRef } from 'react'
+import { useMemo, useRef } from 'react'
import * as THREE from 'three/webgpu'
import useViewer from '../../store/use-viewer'
import { GuideSystem } from '../../systems/guide/guide-system'
@@ -62,23 +62,14 @@ extend(THREE as any)
interface ViewerProps {
children?: React.ReactNode
selectionManager?: 'default' | 'custom'
- isEditor?: boolean
}
const Viewer: React.FC