Browse Source

Up docs api

pull/5735/head v0.21.9
Artur Arseniev 2 years ago
parent
commit
1c65d37419
  1. 18
      docs/api/canvas.md

18
docs/api/canvas.md

@ -90,6 +90,14 @@ editor.on('canvas:pointer', () => {
});
```
* `canvas:refresh` Canvas was refreshed to update elements on top,
like spots/tools (eg. via `editor.Canvas.refresh()` or on frame resize).
```javascript
editor.on('canvas:refresh', (canvasRefreshOptions) => {
console.log('Canvas refreshed with options:', canvasRefreshOptions);
});
```
* `canvas:frame:load` Frame loaded in canvas.
The event is triggered right after iframe's `onload`.
```javascript
@ -396,6 +404,16 @@ Transform a box rect from the world coordinate system to the screen one.
Returns **[Object][2]**
## refresh
Update canvas for spots/tools positioning.
### Parameters
* `opts` **[Object][2]?** Options. (optional, default `{}`)
* `opts.spots` **[Object][2]** Update the position of spots. (optional, default `false`)
[1]: https://github.com/GrapesJS/grapesjs/blob/master/src/canvas/config/config.ts
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

Loading…
Cancel
Save