Skip to content
Snippets Groups Projects
Commit 2c525394 authored by Alexander Rose's avatar Alexander Rose
Browse files

lint and test fixes

parent 03668216
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
*/
import { calculateBoundingSphere } from '../renderable/util';
import { Vec3 } from '../../mol-math/linear-algebra';
describe('renderable', () => {
it('calculateBoundingSphere', () => {
......@@ -34,7 +35,7 @@ describe('renderable', () => {
transform, transform.length / 16
)
expect(boundingSphere.radius).toBe(1.5)
expect(boundingSphere.center).toEqual([1.5, 0.0, 0.0])
expect(boundingSphere.radius).toBeCloseTo(1.58, 2)
expect(Vec3.equals(boundingSphere.center, Vec3.create(1.418367, 0, 0))).toBe(true)
})
})
/**
* Copyright (c) 2018-2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
* Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
*/
......@@ -154,14 +154,12 @@ class State {
}
if (isNested) throw e;
} finally {
if (isNested) {
return;
}
if (!isNested) {
this.inTransaction = false;
this.events.changed.next({ state: this, inTransaction: false });
this.events.isUpdating.next(false);
}
}
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment