add pianoroll widget
This commit is contained in:
parent
094b30cd26
commit
48e0691eec
8 changed files with 62 additions and 23 deletions
|
|
@ -29,14 +29,14 @@ export const getDrawContext = (id = 'test-canvas', options) => {
|
|||
return canvas.getContext(contextType);
|
||||
};
|
||||
|
||||
Pattern.prototype.draw = function (callback, { from, to, onQuery } = {}) {
|
||||
Pattern.prototype.draw = function (callback, { from, to, onQuery, ctx } = {}) {
|
||||
if (typeof window === 'undefined') {
|
||||
return this;
|
||||
}
|
||||
if (window.strudelAnimation) {
|
||||
cancelAnimationFrame(window.strudelAnimation);
|
||||
}
|
||||
const ctx = getDrawContext();
|
||||
ctx = ctx || getDrawContext();
|
||||
let cycle,
|
||||
events = [];
|
||||
const animate = (time) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue