make onPaint work with mutiple repls on screen
+ add warning if stock onPaint is not overloaded
This commit is contained in:
parent
29cb6195b3
commit
6b98e414c6
2 changed files with 10 additions and 11 deletions
|
|
@ -96,9 +96,8 @@ export const cleanupDraw = (clearScreen = true) => {
|
|||
}
|
||||
};
|
||||
|
||||
Pattern.prototype.onPaint = function (onPaint) {
|
||||
// this is evil! TODO: add pattern.context
|
||||
this.context = { onPaint };
|
||||
Pattern.prototype.onPaint = function () {
|
||||
console.warn('[draw] onPaint was not overloaded. Some drawings might not work');
|
||||
return this;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue