Skip to content

Commit

Permalink
work for the #5749
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-kurmanov committed Mar 14, 2023
1 parent d343e57 commit 0f821fb
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dragdrop/ranking-choices.ts
Original file line number Diff line number Diff line change
@@ -33,6 +33,11 @@ export class DragDropRankingChoices extends DragDropChoices {
draggedElementShortcut.shortcutXOffset = event.clientX - rect.x;
draggedElementShortcut.shortcutYOffset = event.clientY - rect.y;

if (this.parentElement && this.parentElement.useFullItemSizeForShortcut) {
draggedElementShortcut.style.width = draggedElementNode.offsetWidth + "px";
draggedElementShortcut.style.height = draggedElementNode.offsetHeight + "px";
}

return draggedElementShortcut;
}

7 changes: 7 additions & 0 deletions src/question_ranking.ts
Original file line number Diff line number Diff line change
@@ -313,6 +313,13 @@ export class QuestionRankingModel extends QuestionCheckboxModel {
public set longTap(val: boolean) {
this.setPropertyValue("longTap", val);
}

public get useFullItemSizeForShortcut(): boolean {
return this.getPropertyValue("useFullItemSizeForShortcut");
}
public set useFullItemSizeForShortcut(val: boolean) {
this.setPropertyValue("useFullItemSizeForShortcut", val);
}
}

Serializer.addClass(

0 comments on commit 0f821fb

Please sign in to comment.