# all files / diagram-js/lib/util/ PositionUtil.js

100% Statements 2/2
100% Branches 0/0
100% Functions 2/2
100% Lines 2/2

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    740×

    988×

     export function center(bounds) {
      return {
        x: bounds.x + (bounds.width / 2),
        y: bounds.y + (bounds.height / 2)
      };
    }

    export function delta(a, b) {
      return {
        x: a.x - b.x,
        y: a.y - b.y
      };
    }