Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jan 7, 2024
1 parent 186b262 commit ef1c4f8
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions lib/src/components/TreePanel/TreeCanvasBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,22 @@ const TreeCanvasBlock = observer(function ({
const [toggleNodeMenu, setToggleNodeMenu] = useState<TooltipData>()
const [hoverElt, setHoverElt] = useState<ClickEntry>()

const { scrollY, treeWidth, margin, blockSize, highResScaleFactor } = model
const {
scrollY,
treeAreaWidth,
treeWidth,
margin,
blockSize,
highResScaleFactor,
} = model

useEffect(() => {
const ctx = ref.current?.getContext('2d')
if (!ctx) {
return
}
return autorun(() => {
const ctx = ref.current?.getContext('2d')
if (!ctx) {
return
}
console.log('t1')
renderTreeCanvas({
ctx,
model,
Expand Down

0 comments on commit ef1c4f8

Please sign in to comment.