 			vp.dim_element = dim_element
 			vp.dim_pointer = dim_pointer[placement]
 
-			if @_use_element_width_as_min_width
-				vp.set_width = false
-			else
-				vp.set_width = true
-
-			#
 
 			switch placement
 				when "c"

		if @__element
			dim_element = CUI.DOM.getDimensions(@__element)

			if @_use_element_width_as_min_width
				dim_layer.borderBoxWidth = Math.max(dim_layer.borderBoxWidth, dim_element.borderBoxWidth)

		else if @_show_at_position
			dim_element =
				viewportTop: @_show_at_position.top

		if vp.layer_pos.width < 10 or vp.layer_pos.height < 10
			console.warn("Layer: DIM is very small, layer might not be visible. Placement:", placement, "Dimensions:", vp, "Layer:", @__layer.DOM)

		if @_element and @_use_element_width_as_min_width
			minWidth = dim_element.borderBoxWidth
		else
			minWidth = undefined

		# set layer
		CUI.DOM.setStyle @__layer.DOM,
			top: vp.layer_pos.top
			left: vp.layer_pos.left
			width: vp.layer_pos.width
			height: vp.layer_pos.height
			minWidth: minWidth
			# maxWidth: vp.width + vp.overlap_width
			# maxHeight: vp.height + vp.overlap_height
			margin: 0
