@@ -11,7 +11,7 @@ <h3 id="getting-started" class="docs-header-link">
11
11
features. You can now add the < code > cdkDrag</ code > directive to elements to make them draggable. When
12
12
outside of a < code > cdkDropList</ code > element, draggable elements can be freely moved around the page.
13
13
You can add < code > cdkDropList</ code > elements to constrain where elements may be dropped.</ p >
14
- < div material-docs-example ="cdk-drag-drop-overview "> </ div >
14
+ </ div > < div material-docs-example ="cdk-drag-drop-overview "> </ div > < div class =" docs-markdown " >
15
15
16
16
17
17
< h3 id ="reordering-lists " class ="docs-header-link ">
@@ -22,7 +22,7 @@ <h3 id="reordering-lists" class="docs-header-link">
22
22
reorderable collection. Items will automatically rearrange as an element moves. Note
23
23
that this will < em > not</ em > update your data model; you can listen to the < code > cdkDropListDropped</ code > event to
24
24
update the data model once the user finishes dragging.</ p >
25
- < div material-docs-example ="cdk-drag-drop-sorting "> </ div >
25
+ </ div > < div material-docs-example ="cdk-drag-drop-sorting "> </ div > < div class =" docs-markdown " >
26
26
27
27
28
28
< h3 id ="transferring-items-between-lists " class ="docs-header-link ">
@@ -32,7 +32,7 @@ <h3 id="transferring-items-between-lists" class="docs-header-link">
32
32
< p > The < code > cdkDropList</ code > directive supports transferring dragged items between connected drop zones.
33
33
You can connect one or more < code > cdkDropList</ code > instances together by setting the < code > cdkDropListConnectedTo</ code >
34
34
property or by wrapping the elements in an element with the < code > cdkDropListGroup</ code > attribute.</ p >
35
- < div material-docs-example ="cdk-drag-drop-connected-sorting "> </ div >
35
+ </ div > < div material-docs-example ="cdk-drag-drop-connected-sorting "> </ div > < div class =" docs-markdown " >
36
36
37
37
< p > Note that < code > cdkDropListConnectedTo</ code > works both with a direct reference to another < code > cdkDropList</ code > , or
38
38
by referencing the < code > id</ code > of another drop container:</ p >
@@ -54,7 +54,7 @@ <h3 id="transferring-items-between-lists" class="docs-header-link">
54
54
}
55
55
< span class ="hljs-tag "> </< span class ="hljs-name "> div</ span > ></ span >
56
56
</ code > </ pre >
57
- < div material-docs-example ="cdk-drag-drop-connected-sorting-group "> </ div >
57
+ </ div > < div material-docs-example ="cdk-drag-drop-connected-sorting-group "> </ div > < div class =" docs-markdown " >
58
58
59
59
60
60
< h3 id ="attaching-data " class ="docs-header-link ">
@@ -164,7 +164,7 @@ <h3 id="customizing-the-drag-area-using-a-handle" class="docs-header-link">
164
164
restrict the user to only be able to do so using a handle element, you can do it by adding the
165
165
< code > cdkDragHandle</ code > directive to an element inside of < code > cdkDrag</ code > . Note that you can have as many
166
166
< code > cdkDragHandle</ code > elements as you want:</ p >
167
- < div material-docs-example ="cdk-drag-drop-handle "> </ div >
167
+ </ div > < div material-docs-example ="cdk-drag-drop-handle "> </ div > < div class =" docs-markdown " >
168
168
169
169
170
170
< h3 id ="customizing-the-drag-preview " class ="docs-header-link ">
@@ -180,7 +180,7 @@ <h3 id="customizing-the-drag-preview" class="docs-header-link">
180
180
< p > Note that the cloned element will remove its < code > id</ code > attribute in order to avoid having multiple
181
181
elements with the same < code > id</ code > on the page. This will cause any CSS that targets that < code > id</ code > not
182
182
to be applied.</ p >
183
- < div material-docs-example ="cdk-drag-drop-custom-preview "> </ div >
183
+ </ div > < div material-docs-example ="cdk-drag-drop-custom-preview "> </ div > < div class =" docs-markdown " >
184
184
185
185
186
186
< h3 id ="drag-preview-insertion-point " class ="docs-header-link ">
@@ -228,7 +228,7 @@ <h3 id="customizing-the-drag-placeholder" class="docs-header-link">
228
228
show where it will be placed when it's dropped. By default the placeholder is a clone of the element
229
229
that is being dragged, however you can replace it with a custom one using the < code > *cdkDragPlaceholder</ code >
230
230
directive:</ p >
231
- < div material-docs-example ="cdk-drag-drop-custom-placeholder "> </ div >
231
+ </ div > < div material-docs-example ="cdk-drag-drop-custom-placeholder "> </ div > < div class =" docs-markdown " >
232
232
233
233
234
234
< h3 id ="list-orientation " class ="docs-header-link ">
@@ -237,7 +237,7 @@ <h3 id="list-orientation" class="docs-header-link">
237
237
</ h3 >
238
238
< p > The < code > cdkDropList</ code > directive assumes that lists are vertical by default. This can be
239
239
changed by setting the < code > cdkDropListOrientation</ code > property to < code > horizontal</ code > .</ p >
240
- < div material-docs-example ="cdk-drag-drop-horizontal-sorting "> </ div >
240
+ </ div > < div material-docs-example ="cdk-drag-drop-horizontal-sorting "> </ div > < div class =" docs-markdown " >
241
241
242
242
243
243
< h3 id ="list-wrapping " class ="docs-header-link ">
@@ -251,7 +251,7 @@ <h3 id="list-wrapping" class="docs-header-link">
251
251
will use a different strategy of sorting the elements that works by moving them in the DOM. It has
252
252
the advantage of allowing the items to wrap to the next line, but it < strong > cannot</ strong > animate the
253
253
sorting action.</ p >
254
- < div material-docs-example ="cdk-drag-drop-mixed-sorting "> </ div >
254
+ </ div > < div material-docs-example ="cdk-drag-drop-mixed-sorting "> </ div > < div class =" docs-markdown " >
255
255
256
256
257
257
< h3 id ="copying-items-from-one-list-to-another " class ="docs-header-link ">
@@ -270,7 +270,7 @@ <h3 id="copying-items-from-one-list-to-another" class="docs-header-link">
270
270
< p > Combining < code > cdkDropListHasAnchor</ code > and < code > cdkDropListSortingDisabled</ code > makes it possible to construct a
271
271
list that user copies items from, but doesn't necessarily transfer out of (e.g. a product list and
272
272
a shopping cart).</ p >
273
- < div material-docs-example ="cdk-drag-drop-copy-list "> </ div >
273
+ </ div > < div material-docs-example ="cdk-drag-drop-copy-list "> </ div > < div class =" docs-markdown " >
274
274
275
275
276
276
< h3 id ="restricting-movement-within-an-element " class ="docs-header-link ">
@@ -282,7 +282,7 @@ <h3 id="restricting-movement-within-an-element" class="docs-header-link">
282
282
selector and looking up the DOM until it finds an element that matches it. If a match is found,
283
283
it'll be used as the boundary outside of which the element can't be dragged. < code > cdkDragBoundary</ code > can
284
284
also be used when < code > cdkDrag</ code > is placed inside a < code > cdkDropList</ code > .</ p >
285
- < div material-docs-example ="cdk-drag-drop-boundary "> </ div >
285
+ </ div > < div material-docs-example ="cdk-drag-drop-boundary "> </ div > < div class =" docs-markdown " >
286
286
287
287
288
288
< h3 id ="restricting-movement-along-an-axis " class ="docs-header-link ">
@@ -292,7 +292,7 @@ <h3 id="restricting-movement-along-an-axis" class="docs-header-link">
292
292
< p > By default, < code > cdkDrag</ code > allows free movement in all directions. To restrict dragging to a
293
293
specific axis, you can set < code > cdkDragLockAxis</ code > on < code > cdkDrag</ code > or < code > cdkDropListLockAxis</ code > on < code > cdkDropList</ code >
294
294
to either < code > "x"</ code > or < code > "y"</ code > .</ p >
295
- < div material-docs-example ="cdk-drag-drop-axis-lock "> </ div >
295
+ </ div > < div material-docs-example ="cdk-drag-drop-axis-lock "> </ div > < div class =" docs-markdown " >
296
296
297
297
298
298
< h3 id ="alternate-drag-root-element " class ="docs-header-link ">
@@ -304,7 +304,7 @@ <h3 id="alternate-drag-root-element" class="docs-header-link">
304
304
up the DOM until it finds an element that matches the selector. If an element is found, it'll become
305
305
the element that is moved as the user is dragging. This is useful for cases like making a dialog
306
306
draggable.</ p >
307
- < div material-docs-example ="cdk-drag-drop-root-element "> </ div >
307
+ </ div > < div material-docs-example ="cdk-drag-drop-root-element "> </ div > < div class =" docs-markdown " >
308
308
309
309
310
310
< h3 id ="controlling-which-items-can-be-moved-into-a-container " class ="docs-header-link ">
@@ -316,7 +316,7 @@ <h3 id="controlling-which-items-can-be-moved-into-a-container" class="docs-heade
316
316
< code > cdkDropListEnterPredicate</ code > which will be called whenever an item is about to enter a
317
317
new container. Depending on whether the predicate returns < code > true</ code > or < code > false</ code > , the item may or may not
318
318
be allowed into the new container.</ p >
319
- < div material-docs-example ="cdk-drag-drop-enter-predicate "> </ div >
319
+ </ div > < div material-docs-example ="cdk-drag-drop-enter-predicate "> </ div > < div class =" docs-markdown " >
320
320
321
321
322
322
< h3 id ="disabled-dragging " class ="docs-header-link ">
@@ -327,7 +327,7 @@ <h3 id="disabled-dragging" class="docs-header-link">
327
327
< code > cdkDragDisabled</ code > input on a < code > cdkDrag</ code > item. Furthermore, you can disable an entire list
328
328
using the < code > cdkDropListDisabled</ code > input on a < code > cdkDropList</ code > or a particular handle via
329
329
< code > cdkDragHandleDisabled</ code > on < code > cdkDragHandle</ code > .</ p >
330
- < div material-docs-example ="cdk-drag-drop-disabled "> </ div >
330
+ </ div > < div material-docs-example ="cdk-drag-drop-disabled "> </ div > < div class =" docs-markdown " >
331
331
332
332
333
333
< h3 id ="disabled-sorting " class ="docs-header-link ">
@@ -339,7 +339,7 @@ <h3 id="disabled-sorting" class="docs-header-link">
339
339
< code > cdkDropListSortingDisabled</ code > input which will prevent the items in a < code > cdkDropList</ code > from sorting,
340
340
in addition to preserving the dragged item's initial position in the source list, if the user
341
341
decides to return the item.</ p >
342
- < div material-docs-example ="cdk-drag-drop-disabled-sorting "> </ div >
342
+ </ div > < div material-docs-example ="cdk-drag-drop-disabled-sorting "> </ div > < div class =" docs-markdown " >
343
343
344
344
345
345
< h3 id ="delayed-dragging " class ="docs-header-link ">
@@ -352,7 +352,7 @@ <h3 id="delayed-dragging" class="docs-header-link">
352
352
cases like these you can delay the dragging sequence using the < code > cdkDragStartDelay</ code > input which
353
353
will wait for the user to hold down their pointer for the specified number of milliseconds before
354
354
moving the element.</ p >
355
- < div material-docs-example ="cdk-drag-drop-delay "> </ div >
355
+ </ div > < div material-docs-example ="cdk-drag-drop-delay "> </ div > < div class =" docs-markdown " >
356
356
357
357
358
358
< h3 id ="changing-the-standalone-drag-position " class ="docs-header-link ">
@@ -363,7 +363,7 @@ <h3 id="changing-the-standalone-drag-position" class="docs-header-link">
363
363
moved by a user. The element's position can be explicitly set, however, via the
364
364
< code > cdkDragFreeDragPosition</ code > input. Applications commonly use this, for example, to restore a
365
365
draggable's position after a user has navigated away and then returned.</ p >
366
- < div material-docs-example ="cdk-drag-drop-free-drag-position "> </ div >
366
+ </ div > < div material-docs-example ="cdk-drag-drop-free-drag-position "> </ div > < div class =" docs-markdown " >
367
367
368
368
369
369
< h3 id ="controlling-whether-an-item-can-be-sorted-into-a-particular-index " class ="docs-header-link ">
@@ -374,7 +374,7 @@ <h3 id="controlling-whether-an-item-can-be-sorted-into-a-particular-index" class
374
374
this behavior by setting a < code > cdkDropListSortPredicate</ code > . The predicate function will be called
375
375
whenever an item is about to be moved into a new index. If the predicate returns < code > true</ code > , the
376
376
item will be moved into the new index, otherwise it will keep its current position.</ p >
377
- < div material-docs-example ="cdk-drag-drop-sort-predicate "> </ div >
377
+ </ div > < div material-docs-example ="cdk-drag-drop-sort-predicate "> </ div > < div class =" docs-markdown " >
378
378
379
379
380
380
< h3 id ="integrations-with-angular-material " class ="docs-header-link ">
@@ -388,13 +388,13 @@ <h4 id="sortable-table" class="docs-header-link">
388
388
Sortable table
389
389
</ h4 >
390
390
< p > This example shows how you can set up a table which supports re-ordering of tabs.</ p >
391
- < div material-docs-example ="cdk-drag-drop-table "> </ div >
391
+ </ div > < div material-docs-example ="cdk-drag-drop-table "> </ div > < div class =" docs-markdown " >
392
392
393
393
394
394
< h4 id ="sortable-tabs " class ="docs-header-link ">
395
395
< span header-link ="sortable-tabs "> </ span >
396
396
Sortable tabs
397
397
</ h4 >
398
398
< p > Example of how to add sorting support to a < code > mat-tab-group</ code > .</ p >
399
- < div material-docs-example ="cdk-drag-drop-tabs "> </ div >
399
+ </ div > < div material-docs-example ="cdk-drag-drop-tabs "> </ div > < div class =" docs-markdown " >
400
400
</ div >
0 commit comments