Keep position when using pick, group and rank control | XM Community
Question

Keep position when using pick, group and rank control

  • 7 November 2018
  • 2 replies
  • 9 views

Hi there,

I am using the pick, group and rank control to drag an image into the group box. This works well, however once the user has dragged the image into the box it snaps to the top-left. Is there a way to override this functionality and leave the image where it was originally dragged to?

Cheers,

2 replies

Userlevel 6
Badge +27

You can use the  CSS to modify the group container

Userlevel 7
Badge +27

@Shashi  I’m not sure if CSS can accomplish this. From what I can tell, when an item is being dragged over a Choice group, a new element is created that acts as a placeholder for the item to be dropped in. Adding the below CSS to the Look & Feel will make this placeholder visible and make its background red:

.ui-sortable-placeholder {
visibility: visible !important;
background: #ff0000;
}

When being dragged, the position of the item is set by the ‘left’ and ‘top’ properties with inline CSS. I’m not sure how to adjust those values and still have it be compatible with the placeholder so that the item registers as a response for the Group.

Leave a Reply