Skip to content

Commit

Permalink
fix(animation): Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaiklor committed Feb 15, 2016
1 parent 806fd11 commit 1fba655
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/advanced.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const cursor = require('kittik-cursor').create().resetTTY();
const cursor = require('kittik-cursor').create().resetTTY().hideCursor();
const Rectangle = require('kittik-shape-rectangle');
const Slide = require('../lib/Slide');
const AVAILABLE_DIRECTIONS = ['inUp', 'inDown', 'inLeft', 'inRight'];
Expand Down Expand Up @@ -29,6 +29,7 @@ const onTick = (shape, property, value) => {
const nextShape = shape => {
renderedShapes.push(shape);
currentShapeIndex++;
if (currentShapeIndex == 9) cursor.showCursor().flush();
playAnimation(currentShapeIndex);
};

Expand Down
4 changes: 2 additions & 2 deletions examples/simple.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const cursor = require('kittik-cursor').create().resetTTY();
const cursor = require('kittik-cursor').create().resetTTY().hideCursor();
const Slide = require('../lib/Slide');
const shape = require('kittik-shape-rectangle').create({
text: 'Good news, everybody!',
Expand All @@ -10,4 +10,4 @@ const shape = require('kittik-shape-rectangle').create({
width: '50%'
});

new Slide({duration: 3000}).on('tick', shape => shape.render(cursor) && cursor.flush().eraseScreen()).animate(shape);
new Slide({duration: 3000}).on('tick', shape => shape.render(cursor) && cursor.flush().eraseScreen()).animate(shape).then(() => cursor.showCursor().flush());

0 comments on commit 1fba655

Please sign in to comment.