-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow setting drag start delay on touch devices
references mattlewis92/angular-calendar#1144
- Loading branch information
1 parent
aaaffe6
commit c9b28a5
Showing
4 changed files
with
110 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
<div mwlDraggable dropData="foo" dragActiveClass="drag-active"> | ||
<div | ||
mwlDraggable | ||
dropData="foo" | ||
dragActiveClass="drag-active" | ||
[touchStartLongPress]="{ delay: 300, delta: 30 }" | ||
> | ||
Drag me! | ||
</div> | ||
<div mwlDraggable dropData="bar" dragActiveClass="drag-active" [dragSnapGrid]="{x: 100, y: 100}"> | ||
<div | ||
mwlDraggable | ||
dropData="bar" | ||
dragActiveClass="drag-active" | ||
[dragSnapGrid]="{ x: 100, y: 100 }" | ||
[touchStartLongPress]="{ delay: 300, delta: 30 }" | ||
> | ||
I snap to a 100 x 100 grid | ||
</div> | ||
<div | ||
mwlDroppable | ||
(drop)="onDrop($event)" | ||
dragOverClass="drop-over-active"> | ||
<div mwlDroppable (drop)="onDrop($event)" dragOverClass="drop-over-active"> | ||
<span [hidden]="droppedData">Drop here</span> | ||
<span [hidden]="!droppedData">Item dropped here with data: "{{ droppedData }}"!</span> | ||
<span [hidden]="!droppedData" | ||
>Item dropped here with data: "{{ droppedData }}"!</span | ||
> | ||
</div> |