mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-11 11:29:42 +02:00
#3358 Third set of changes after review
This commit is contained in:
@@ -173,7 +173,6 @@ export interface MermaidConfig {
|
|||||||
* via the `definition` "BlockDiagramConfig".
|
* via the `definition` "BlockDiagramConfig".
|
||||||
*/
|
*/
|
||||||
export interface BlockDiagramConfig extends BaseDiagramConfig {
|
export interface BlockDiagramConfig extends BaseDiagramConfig {
|
||||||
useMaxWidth?: boolean;
|
|
||||||
padding?: number;
|
padding?: number;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
// @ts-ignore: jison doesn't export types
|
|
||||||
import { calculateBlockPosition } from './layout.js';
|
import { calculateBlockPosition } from './layout.js';
|
||||||
|
|
||||||
describe('Layout', function () {
|
describe('Layout', function () {
|
||||||
it('It shoud calulatepositions correctly', () => {
|
it('should calculate position correctly', () => {
|
||||||
expect(calculateBlockPosition(2, 0)).toEqual({ px: 0, py: 0 });
|
expect(calculateBlockPosition(2, 0)).toEqual({ px: 0, py: 0 });
|
||||||
expect(calculateBlockPosition(2, 1)).toEqual({ px: 1, py: 0 });
|
expect(calculateBlockPosition(2, 1)).toEqual({ px: 1, py: 0 });
|
||||||
expect(calculateBlockPosition(2, 2)).toEqual({ px: 0, py: 1 });
|
expect(calculateBlockPosition(2, 2)).toEqual({ px: 0, py: 1 });
|
||||||
|
Reference in New Issue
Block a user