mirror of
https://github.com/grafana/grafana.git
synced 2025-09-24 09:23:54 +08:00

* Geomap: add measuring tools * Add measure type selection * Add controls and state to measure overlay * Override tooltip mouse events when menu active * Move measure tools to top right * Lay groundwork for units and consolidate measuring * Create measure vector layer class * Improve styling to match other overlay controls * Consolidate styling and use theme2 * Update unit language and add km2 Co-authored-by: Ryan McKinley <ryantxu@gmail.com> Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
17 lines
523 B
TypeScript
17 lines
523 B
TypeScript
import { measures } from './measure';
|
|
|
|
describe('get measure utils', () => {
|
|
it('switch from length to area', () => {
|
|
const length = measures[0];
|
|
expect(length.value).toBe('length');
|
|
expect(length.getUnit('ft').value).toBe('ft');
|
|
expect(length.getUnit('ft2').value).toBe('ft');
|
|
});
|
|
it('switch from area to length', () => {
|
|
const area = measures[1];
|
|
expect(area.value).toBe('area');
|
|
expect(area.getUnit('ft2').value).toBe('ft2');
|
|
expect(area.getUnit('ft').value).toBe('ft2');
|
|
});
|
|
});
|