Skip to content

Commit

Permalink
updating readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-codes committed Nov 18, 2017
1 parent 504530c commit fa4b742
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
30 changes: 11 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,20 @@
## Demo
![example](https://github.com/sean-codes/kanban/blob/master/image.gif?raw=true)
Try out the [demo](https://sean-codes.github.io/kanban/example/basic.html)
Try out the [demo](https://sean-codes.github.io/kanban/example/demo.html)

## Setup
```js
var kanban = new Kanban({
selector: '#myKanBan',
lanes: [
{ title: 'Lane 1', name: 'lane1' }
],
title: (title) => { return title },
content: (content) => { return content },
cards: [
{
lane: 'lane1',
content: 'Test Card 1'
},
{
lane: 'lane2',
content: 'Test Card 2'
}
]
})

// Create board
var myKanban = new KanbanBoard('#kanBanContainer')

// Add Lanes
myKanban.addLane(new KanbanLane('lane1ID', 'Lane 1 Title'))
myKanban.addLane(new KanbanLane('lane2ID', 'Lane 2 Title'))

// Add Cards
myKanBan.addCard(new KanbanCard('cardID', 'lane1ID', content))
```

The options are detailed below.
Expand Down
2 changes: 1 addition & 1 deletion src/Lane.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class KanbanLane {
card.movedToCardAndLane = false
}

appendCardAroundCard(card1, card2){
appendCardAroundCard(card1, card2) {
card1.lane = this.id
card1.movedToCardAndLane = card1.html.parentElement != card2.html.parentElement
if(!card2.html.nextSibling && !card1.movedToCardAndLane){
Expand Down

0 comments on commit fa4b742

Please sign in to comment.