You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to implement margin and padding drag handlers similar to how they are done in GrapesJS Studio. I can achieve this functionality, but it comes with a trade-off. To align the spots with the selected component, I am using the editor.on('canvas:spot', () => {}) event. However, as I need to track the hover spots too, the editor gets re-rendered countless times as soon as I move the mouse even slightly.
Can anyone help me on how to use canvas spots in this context properly? I'm using React/Next.js for my project, and I'm encountering performance issues with this approach. @artf your help will be so much appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am trying to implement margin and padding drag handlers similar to how they are done in GrapesJS Studio. I can achieve this functionality, but it comes with a trade-off. To align the spots with the selected component, I am using the editor.on('canvas:spot', () => {}) event. However, as I need to track the hover spots too, the editor gets re-rendered countless times as soon as I move the mouse even slightly.
Can anyone help me on how to use canvas spots in this context properly? I'm using React/Next.js for my project, and I'm encountering performance issues with this approach.
@artf your help will be so much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions