File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,13 @@ Return the Blocks container element
151
151
152
152
Returns ** [ HTMLElement] [ 14 ] **
153
153
154
+ ## getDragBlock
155
+
156
+ Returns currently dragging block.
157
+ Updated when the drag starts and cleared once it's done.
158
+
159
+ Returns ** ([ Block] | [ undefined] [ 15 ] )**
160
+
154
161
## render
155
162
156
163
Render blocks
@@ -160,8 +167,8 @@ Render blocks
160
167
* ` blocks ` ** [ Array] [ 13 ] ** Blocks to render, without the argument will render all global blocks
161
168
* ` opts ` ** [ Object] [ 11 ] ** Options (optional, default ` {} ` )
162
169
163
- * ` opts.external ` ** [ Boolean] [ 15 ] ?** Render blocks in a new container (HTMLElement will be returned)
164
- * ` opts.ignoreCategories ` ** [ Boolean] [ 15 ] ?** Render blocks without categories
170
+ * ` opts.external ` ** [ Boolean] [ 16 ] ?** Render blocks in a new container (HTMLElement will be returned)
171
+ * ` opts.ignoreCategories ` ** [ Boolean] [ 16 ] ?** Render blocks without categories
165
172
166
173
### Examples
167
174
@@ -217,4 +224,6 @@ Returns **[HTMLElement][14]** Rendered element
217
224
218
225
[ 14 ] : https://developer.mozilla.org/docs/Web/HTML/Element
219
226
220
- [ 15 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
227
+ [ 15 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined
228
+
229
+ [ 16 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ Set canvas position coordinates
178
178
179
179
* ` x ` ** [ Number] [ 22 ] ** Horizontal position
180
180
* ` y ` ** [ Number] [ 22 ] ** Vertical position
181
+ * ` opts ` ** ToWorldOption** (optional, default ` {} ` )
181
182
182
183
### Examples
183
184
@@ -233,6 +234,12 @@ canvas.addFrame({
233
234
234
235
Returns ** [ Frame] **
235
236
237
+ ## getLastDragResult
238
+
239
+ Get the last created Component from a drag & drop to the canvas.
240
+
241
+ Returns ** ([ Component] | [ undefined] [ 23 ] )**
242
+
236
243
[ 1 ] : https://github.com/GrapesJS/grapesjs/blob/master/src/canvas/config/config.ts
237
244
238
245
[ 2 ] : #getconfig
@@ -276,3 +283,5 @@ Returns **[Frame]**
276
283
[ 21 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
277
284
278
285
[ 22 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
286
+
287
+ [ 23 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined
You can’t perform that action at this time.
0 commit comments