fix: menu drifting issue

This commit is contained in:
Peng Xiao
2022-06-02 18:00:44 +08:00
parent 7a70231f5e
commit 54ddc09f3c
12 changed files with 102 additions and 196 deletions

View File

@@ -10,6 +10,7 @@ const printPoint = (point: number[]) => {
export const DevTools = observer(() => {
const {
viewport: {
bounds,
camera: { point, zoom },
},
inputs,
@@ -40,6 +41,7 @@ export const DevTools = observer(() => {
['MP', printPoint(inputs.currentPoint)],
['MS', printPoint(inputs.currentScreenPoint)],
['VP', printPoint(point)],
['VBR', printPoint([bounds.maxX, bounds.maxY])],
]
.map(p => p.join(''))
.join('|')