Back to forum

How to listen fullscreen event

Resolved

Hi,
 I have a problem, when I click button of fullscreen or exitFullscreen ,I want to do some thing, how can I listen the event of fullscreen 

1 answer

WebDataRocks Team WebDataRocks January 29, 2019

Hello!
Thank you for your question.
To understand how the Toolbar works, you can see the full list of its methods in the source code (i.e., in a webdatarocks.toolbar.js file).
In particular, the enterFullscreen and exitFullscreen methods may be suitable for your case.
You can use a beforetoolbarcreated event to customize the Toolbar and override its default functionality.
Please check this CodePen demo to learn how to do it.

Also, you can refer to this tutorial to find out more details about the Toolbar customization. 
Hope this is helpful.
Best regards,
WebDataRocks team

Move up