-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added fDragHandle documentation
- Loading branch information
1 parent
daec81b
commit a655fdc
Showing
1 changed file
with
41 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Drag Handle | ||
|
||
**Selector:** [fDragHandle] | ||
|
||
The **FDragHandle** is a directive that specifies the handle for dragging a node within a flow of elements. It is used in conjunction with the [fNode](f-node-directive) directive to enable dragging functionality. | ||
|
||
## Styles | ||
- `.f-component` A general class applied to all F components for shared styling. | ||
|
||
- `.f-drag-handle` Class specific to the drag handle directive, providing styles for the drag handle representation. | ||
|
||
## Usage | ||
|
||
#### Node with drag handle | ||
|
||
We need to add the **fDragHandle** directive inside [fNode](f-node-directive) to specify the handle for dragging. | ||
This can be any element inside the node that will act as the drag handle. | ||
|
||
```html | ||
<f-flow |:|fDraggable|:|> | ||
<f-canvas> | ||
<div fNode [fNodePosition]="{ x: 100, y: 200 }"> | ||
<div |:|fDragHandle|:|>Node</div> | ||
</div> | ||
</f-canvas> | ||
</f-flow> | ||
``` | ||
|
||
#### Disabling Dragging | ||
|
||
This code snippet shows how to disable dragging for a node. | ||
|
||
```html | ||
<f-flow fDraggable> | ||
<f-canvas> | ||
<div fNode |:|[fNodeDraggingDisabled]="true"|:| [fNodePosition]="{ x: 100, y: 200 }"> | ||
<div fDragHandle>Node</div> | ||
</div> | ||
</f-canvas> | ||
</f-flow> | ||
``` |