     # check the default values for overlapping boundaries, then
     # recalculate if there are overlaps
 
-    violations = boundaryViolations getCoordsFromPlacement(d, placement, direction),\
+    violations = getBoundaryViolations getCoordsFromPlacement(d, placement, direction),\
     d.container.width, d.container.height
 
     if Object.keys(violations).length > 0 # check for possible alternatives

    right   : "right"

  # will return an object with the amount of clipped pixels
  boundaryViolations = (coordinates,width,height)=>
    violations = {}
    if coordinates.left < 0
      violations.left   = -(coordinates.left)

      ]

      for variant in variants
        if Object.keys(getBoundaryViolations(getCoordsFromPlacement(d,variant[0],variant[1]),\
        d.container.width, d.container.height)).length is 0
          [placement,direction] = variant
          break
