Skip to content

Commit 8b9e094

Browse files
committed
fix(animation): Update all dependecies
1 parent 3cff2de commit 8b9e094

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

examples/advanced.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
const cursor = require('kittik-cursor').create().resetTTY();
3+
const cursor = require('kittik-cursor').create().resetTTY().hideCursor();
44
const Rectangle = require('kittik-shape-rectangle');
55
const Animation = require('../lib/Animation');
66
const shapes = [
@@ -38,6 +38,7 @@ const onTick = (shape, property, value) => {
3838
const nextShape = shape => {
3939
renderedShapes.push(shape);
4040
currentShapeIndex++;
41+
if (currentShapeIndex == 9) cursor.showCursor().flush();
4142
playAnimation(currentShapeIndex);
4243
};
4344

examples/simple.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
const cursor = require('kittik-cursor').create().resetTTY();
3+
const cursor = require('kittik-cursor').create().resetTTY().hideCursor();
44
const shape = require('kittik-shape-rectangle').create({background: 'white', x: 'center'});
55
const Animation = require('../lib/Animation');
66

@@ -14,4 +14,4 @@ class Slide extends Animation {
1414
}
1515
}
1616

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

0 commit comments

Comments
 (0)