Reload canva script when block dropped and it's depend on script. #3749
Unanswered
aidenchong95
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Please, show the code of the custom component used for the slider. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, one of the block i created is product slider which depends on the script. The block only well-rendered after i save and reload the page (re-initiate everything). But the solution i need is the block rendered properly without save and reload the page.
This is the after save and reload the page
But after i drag and drop the product slider block is not rendered. (Because the script not loaded)
I have tried using editor.refresh() or the code below but still not working
editor.on('block:drag:stop', model => { console.log('dropped block') editor.refresh() editor.trigger('test:canvasOffset'); editor.trigger('frame:updated'); })
Beta Was this translation helpful? Give feedback.
All reactions