Skip to content
This repository has been archived by the owner on Jun 6, 2020. It is now read-only.

Commit

Permalink
Copy static Processing properties onto mobile processing ctor.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Humphrey committed Oct 25, 2011
1 parent ddd1e7e commit 6b87013
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion processing-mobile.js
Expand Up @@ -104,7 +104,15 @@
attachLocationCallback(p5);
return p5;
};
// TODO: this will kill stuff like Processing.instances, need to fix
window.Processing.prototype = Pp;

// Copy static properties onto new Processing
for (var prop in P5) {
if (!P5.hasOwnProperty(prop)) {
continue;
}
window.Processing[prop] = P5[prop];
}

// Extend any existing Processing instances with location callback, too.
document.addEventListener('DOMContentLoaded', function() {
Expand Down

0 comments on commit 6b87013

Please sign in to comment.