[Code Style] Use prototypes in Plot bundle

WTD-1482.
This commit is contained in:
Victor Woeltjen
2015-08-13 12:12:15 -07:00
parent aefad6fdd3
commit 820c15d74c
11 changed files with 844 additions and 852 deletions

View File

@ -39,6 +39,12 @@ define(
mockSeries,
controller;
function bind(method, thisObj) {
return function () {
return method.apply(thisObj, arguments);
};
}
beforeEach(function () {
mockScope = jasmine.createSpyObj(
@ -196,13 +202,13 @@ define(
});
it("allows plots to be updated", function () {
expect(controller.update).not.toThrow();
expect(bind(controller.update, controller)).not.toThrow();
});
it("allows changing pan-zoom state", function () {
expect(controller.isZoomed).not.toThrow();
expect(controller.stepBackPanZoom).not.toThrow();
expect(controller.unzoom).not.toThrow();
expect(bind(controller.isZoomed, controller)).not.toThrow();
expect(bind(controller.stepBackPanZoom, controller)).not.toThrow();
expect(bind(controller.unzoom, controller)).not.toThrow();
});
it("indicates if a request is pending", function () {