Skip to content

Commit 06579f8

Browse files
committed
refactor(animation): Remove cursor from arguments list
BREAKING CHANGE: Remove cursor from animate() arguments
1 parent ea5cc2a commit 06579f8

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/Animation.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import EventEmitter from 'events';
2-
import { EASING } from './easing';
2+
import {EASING} from './easing';
33

44
/**
55
* Base class for creating other animations.
@@ -138,10 +138,9 @@ export default class Animation extends EventEmitter {
138138
*
139139
* @abstract
140140
* @param {Shape} shape Shape instance that need to be animated
141-
* @param {Cursor} cursor Cursor instance that you can use for rendering other stuff
142141
* @returns {Promise} Returns Promise that fulfills with shape instance when animation is done
143142
*/
144-
animate(shape, cursor) {
143+
animate(shape) {
145144
return Promise.reject(new Error('You must implement animate() method'));
146145
}
147146

@@ -171,7 +170,7 @@ export default class Animation extends EventEmitter {
171170
const start = Date.now();
172171
const end = start + duration;
173172
const tick = resolve => {
174-
let currentTime = Date.now();
173+
const currentTime = Date.now();
175174

176175
if (currentTime > end) {
177176
resolve(shape);

0 commit comments

Comments
 (0)