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
In the demo I have the addGuides button on the right hand side. Upon clicking it, it adds guides in increments of 20 to both the horizontal and vertical guides. These state of guides are found under editor.state.horizontalGuides, editor.horizontalGuides.getGuides(), & editor.moveableLayer.horizontalGuidelines, along with the vertical ones in the vertical named properties; these values are console.logged out after they are modified via addGuides.
The singular element that is generated is snappable to the moveable guides upon clicking the button but the guides have not been rendered. Calling forceUpdate() on either the guides instances does not force them to render(). But, if I interact with the guides before or after clicking the button, the new guides will render once. After that, it goes back to not rendering until I interact with it again.
Is there a way to force it to render programmatically? Or a way to a request modifying (add,remove,move) a guide?
Edit:
It seems like retrieving the innerGuide and calling forceUpdate() does force the rendering. Not sure why the outer one doesn't seem to work.
2nd Edit:
In addition to calling the getInnerGuide().forceUpdate() You'll also need to reload the guides so that you can continue adding guides via the ruler.
The text was updated successfully, but these errors were encountered:
Environments
Description
In the demo I have the
addGuides
button on the right hand side. Upon clicking it, it adds guides in increments of 20 to both the horizontal and vertical guides. These state of guides are found undereditor.state.horizontalGuides
,editor.horizontalGuides.getGuides()
, &editor.moveableLayer.horizontalGuidelines
, along with the vertical ones in thevertical
named properties; these values are console.logged out after they are modified viaaddGuides
.The singular element that is generated is snappable to the moveable guides upon clicking the button but the
guides
have not been rendered. CallingforceUpdate()
on either the guides instances does not force them torender()
. But, if I interact with the guides before or after clicking the button, the new guides will render once. After that, it goes back to not rendering until I interact with it again.Is there a way to force it to render programmatically? Or a way to a
request
modifying (add,remove,move) a guide?Edit:
It seems like retrieving the
innerGuide
and callingforceUpdate()
does force the rendering. Not sure why the outer one doesn't seem to work.2nd Edit:
In addition to calling the
getInnerGuide().forceUpdate()
You'll also need to reload the guides so that you can continue adding guides via the ruler.The text was updated successfully, but these errors were encountered: