 
 
 				overlap_width = dim_layer.borderBoxWidth - layer_pos.width
+
+				# console.debug "overlap:", dim_layer.borderBoxWidth, layer_pos.width, overlap_width
 
 				if overlap_width > 0
 					switch vp.overlap_align

			margin: 0

		if not dim_layer.computedStyle.maxWidth or dim_layer.computedStyle.maxWidth == 'none'
			set_css.maxWidth = vp.width + vp.overlap_width - (vp.layer_pos.left - vp.left)

		if not dim_layer.computedStyle.maxHeight or dim_layer.computedStyle.maxHeight == 'none'
			set_css.maxHeight =  vp.height + vp.overlap_height - (vp.layer_pos.top - vp.top)

		if placement == "c"
			is_fixed = true

			maxHeight: ""

		dim_layer = CUI.DOM.getDimensions(@__layer.DOM)

		# console.debug "layer dimensions:", dim_layer.borderBoxWidth, dim_layer.borderBoxHeight, @__layer.DOM

		allowed_placements = (@_placements or @knownPlacements).slice(0)
		wanted_placement = @_placement or allowed_placements[0]
