Skip to content

Instantly share code, notes, and snippets.

@notmasteryet
Created April 13, 2010 01:40
Show Gist options
  • Save notmasteryet/364225 to your computer and use it in GitHub Desktop.
Save notmasteryet/364225 to your computer and use it in GitHub Desktop.
$.widget("ui.chart", {
// default options
options: {
},
_create: function() {
var snip = function(processing) {
with(processing) { // not prefered way ...
processing.setup = function() {
size(150, 150); // .. use processing.size(150,150) instead
noStroke(); // processing.noStroke();
frameRate(60);
};
processing.draw = function() {
background(220,220,220);
fill(60, 90, 100)
rect(30,30,55,55);
};
}
};
this.processingControl = Processing(this.element[0], snip);
},
destroy: function() {
this.processingControl.exit();
$.Widget.prototype.destroy.apply(this, arguments);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment