When i set the MainHeader hidden (display: none), the click position on the canvas will be shifted upward by the height of the MainHeader. How to solve this?
I clicked and dragged at the red arrow, and the red box shifted upward by about 65px (the height of the MainHeader).
But, on the execution page, when the mainHeader is hidden, there is no mouse click shift.
how can i solve this
That is a good question I have not tried to remove the main header before but I am curious as to why you are removing it
I took a quick look and it looks like we set a const in /packages/editor-ui/src/utils/nodeViewUtils.ts for HEADER_HEIGHT which is used in the same file in getMidCanvasPosition so I suspect this is what you will need to change.
I want to integrate n8n with a system I locally built, and I intend to remove the left navigation bar. However, I have encountered the following issue:
After removing the left navigation bar, the mouse click will be offset to the left. If I remove the header, the mouse click will be offset upwards.
I searched and found that the getMidCanvasPosition method is mainly used to calculate the position of the notes, and does not seem to be used to calculate the position of mouse clicks.
Also, when removing the left navigation and header on the execution log page, there was no occurrence of mouse click offset.
That is interesting, It was the first thing I found and I didn’t try to build it with that change. I can check with our front end team to see if they know where the change needs to be made or if you are already in touch with the sales team about an embed license for your requirements that is another route you could take.
That makes sense, it is always worth having a chat if you think you are going to use it for something as you can get an idea of pricing and the support options but for science it can be tricky.
I will let you know when I hear back on the question.