Permalink
Browse files

Copy static Processing properties onto mobile processing ctor.

  • Loading branch information...
1 parent ddd1e7e commit 6b8701352bc7c13a5a104afb85fffaebbf2b59b9 David Humphrey committed Oct 25, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 processing-mobile.js
View
@@ -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() {

0 comments on commit 6b87013

Please sign in to comment.