export default class Display {
constructor(target) {
this._drawCtx = null;
- this._c_forceCanvas = false;
this._renderQ = []; // queue drawing actions for in-oder rendering
this._flushing = false;
// Mouse state
this._mouse_buttonMask = 0;
- this._mouse_arr = [];
this._viewportDragging = false;
this._viewportDragPos = {};
this._viewportHasMoved = false;
sinon.spy(display, '_scan_renderQ');
});
- afterEach(function () {
- window.requestAnimationFrame = this.old_requestAnimationFrame;
- });
-
it('should try to process an item when it is pushed on, if nothing else is on the queue', function () {
display._renderQ_push({ type: 'noop' }); // does nothing
expect(display._scan_renderQ).to.have.been.calledOnce;