From fa4b74269bc60a0a5661ba5af1866e1fa52645b4 Mon Sep 17 00:00:00 2001 From: sean-codes Date: Sat, 18 Nov 2017 15:37:40 -0600 Subject: [PATCH] updating readme --- README.md | 30 +++++++++++------------------- src/Lane.js | 2 +- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 241f518..01ca004 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/src/Lane.js b/src/Lane.js index 591b748..5604fb7 100644 --- a/src/Lane.js +++ b/src/Lane.js @@ -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){