Clean up expand depth control into proper toolbar UI
Replace debug test buttons with a minimal 'depth: 0 1 2 3' control in the pivot toolbar right side. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3a172e2456
commit
b88795b015
@ -287,17 +287,8 @@ export default function Pivot({ source }) {
|
|||||||
|
|
||||||
{layoutMsg && <span className="text-xs text-green-600 ml-1">{layoutMsg}</span>}
|
{layoutMsg && <span className="text-xs text-green-600 ml-1">{layoutMsg}</span>}
|
||||||
|
|
||||||
{/* expand_depth test buttons */}
|
|
||||||
<div className="ml-auto flex items-center gap-1">
|
<div className="ml-auto flex items-center gap-1">
|
||||||
<span className="text-xs text-gray-300">expand test:</span>
|
<span className="text-xs text-gray-400">depth:</span>
|
||||||
<button onClick={async () => {
|
|
||||||
const v = viewerRef.current; if (!v) return
|
|
||||||
const view = await v.getView()
|
|
||||||
const viewMethods = Object.getOwnPropertyNames(Object.getPrototypeOf(view))
|
|
||||||
console.log('view methods:', viewMethods)
|
|
||||||
}} className="text-xs border border-gray-200 rounded px-1.5 py-0.5 text-gray-500 hover:border-gray-400">
|
|
||||||
log
|
|
||||||
</button>
|
|
||||||
{[0, 1, 2, 3].map(d => (
|
{[0, 1, 2, 3].map(d => (
|
||||||
<button key={d} onClick={async () => {
|
<button key={d} onClick={async () => {
|
||||||
const v = viewerRef.current; if (!v) return
|
const v = viewerRef.current; if (!v) return
|
||||||
@ -305,7 +296,7 @@ export default function Pivot({ source }) {
|
|||||||
await view.set_depth(d)
|
await view.set_depth(d)
|
||||||
const p = await v.getPlugin()
|
const p = await v.getPlugin()
|
||||||
await p.draw(view)
|
await p.draw(view)
|
||||||
}} className="text-xs border border-gray-200 rounded px-1.5 py-0.5 text-gray-500 hover:border-gray-400">
|
}} className="text-xs border border-gray-200 rounded px-1.5 py-0.5 text-gray-500 hover:border-gray-400 hover:border-gray-400">
|
||||||
{d}
|
{d}
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user