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
Plug-in developers want to change the style of their plug-ins or turn them on and off according to the window width, etc. Re:Earth extends the Plug-in API to provide an API for obtaining the current window width. It also provides a function to register an event to be notified when the window width changes, so that plug-ins can detect changes in window width.
Requirements
Expose following Plugin APIs
window width
When this API is called, Re:Earth will return the value of window.innerWidth. For more extensible API, plz give your idea for example supporting window.innerHeight, window.outerWidth, etc.
when window.onresize is called, this Plugin API event reearth.on('resize', () => {}) will be triggered as window size is resized.
return isMobile
Examples
Testing list
[ ]
The text was updated successfully, but these errors were encountered:
Leader
User story
Plug-in developers want to change the style of their plug-ins or turn them on and off according to the window width, etc. Re:Earth extends the Plug-in API to provide an API for obtaining the current window width. It also provides a function to register an event to be notified when the window width changes, so that plug-ins can detect changes in window width.
Requirements
Expose following Plugin APIs
window.innerWidth
. For more extensible API, plz give your idea for example supportingwindow.innerHeight
,window.outerWidth
, etc.window.onresize
is called, this Plugin API eventreearth.on('resize', () => {})
will be triggered as window size is resized.isMobile
Examples
Testing list
The text was updated successfully, but these errors were encountered: