Split up shiny.js

This commit is contained in:
Winston Chang
2015-03-23 13:57:45 -05:00
parent b7fe3ed745
commit ceb428b8bd
38 changed files with 4449 additions and 255 deletions

View File

@@ -0,0 +1,26 @@
var OutputBindingAdapter = function(el, binding) {
this.el = el;
this.binding = binding;
// If the binding actually has a resize method, override the prototype of
// onResize with a version that does a makeResizeFilter on the element.
if (binding.resize) {
this.onResize = makeResizeFilter(el, function(width, height) {
binding.resize(el, width, height);
});
}
};
(function() {
this.onValueChange = function(data) {
this.binding.onValueChange(this.el, data);
};
this.onValueError = function(err) {
this.binding.onValueError(this.el, err);
};
this.showProgress = function(show) {
this.binding.showProgress(this.el, show);
};
this.onResize = function() {
// Intentionally left blank; see constructor
};
}).call(OutputBindingAdapter.prototype);