Skip to content

Commit

Permalink
feat: Added fDragHandle documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
siarheihuzarevich committed Aug 16, 2024
1 parent daec81b commit a655fdc
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions public/docs/en/f-drag-handle-directive.md
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>
```

0 comments on commit a655fdc

Please sign in to comment.