Skip to content

Commit

Permalink
Fxied README
Browse files Browse the repository at this point in the history
  • Loading branch information
joelvh committed Mar 1, 2020
1 parent a431837 commit becd36b
Showing 1 changed file with 24 additions and 30 deletions.
54 changes: 24 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,7 @@ To define the blocks that can be dragged, you need to add the class `.create-flo
var spacing_x = 40
var spacing_y = 100
// Initialize Flowy
flowy(
document.getElementById('canvas'),
onGrab,
onRelease,
onSnap,
spacing_x,
spacing_y
)
flowy(document.getElementById('canvas'), onGrab, onRelease, onSnap, spacing_x, spacing_y)
function onGrab(block) {
// When the user grabs a block
}
Expand Down Expand Up @@ -179,28 +172,29 @@ JSON.stringify(flowy.output())

The JSON object that gets outputted looks like this:

```javascript
[
html: "",
blockarr: [],
blocks: [
{
"id": 1,
"parent": 0,
"data": [
{
"name": "blockid",
"value": "1"
}
],
"attr": [
{
"id": "block-id",
"class": "block-class"
]
}
]
]
```json
{
"html": "",
"blockarr": [],
"blocks": [
{
"id": 1,
"parent": 0,
"data": [
{
"name": "blockid",
"value": "1"
}
],
"attr": [
{
"id": "block-id",
"class": "block-class"
}
]
}
]
}
```

Here's what each property means:
Expand Down

0 comments on commit becd36b

Please sign in to comment.