Adopt CharSizeService in CompositionHelper

This commit is contained in:
Daniel Imms
2019-06-08 15:22:17 -07:00
parent 6246bb5026
commit bfcd2b52c2
5 changed files with 12 additions and 21 deletions
-6
View File
@@ -22,12 +22,6 @@ describe('MouseHelper.getCoords', () => {
mouseHelper = new MouseHelper(renderer as any, new MockCharSizeService(CHAR_WIDTH, CHAR_HEIGHT));
});
describe('when charMeasure is not initialized', () => {
it('should return null', () => {
assert.equal(mouseHelper.getCoords({ clientX: 0, clientY: 0 }, document.createElement('div'), 10, 10), null);
});
});
it('should return the cell that was clicked', () => {
let coords: [number, number];
coords = mouseHelper.getCoords({ clientX: CHAR_WIDTH / 2, clientY: CHAR_HEIGHT / 2 }, document.createElement('div'), 10, 10);