Skip to content

Commit

Permalink
PR: Support Ranking ghost item customization (#8214)
Browse files Browse the repository at this point in the history
* work for the #8056

* work for the #8056

* work for the #8056
  • Loading branch information
dmitry-kurmanov authored May 6, 2024
1 parent 648d819 commit dc2d847
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/common-styles/common-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
@import "./sv-ranking.scss";
@import "./sv-list.scss";
@import "./sv-save-data.scss";
@import "./sv-string-viewer.scss";
@import "./sv-string-viewer.scss";
14 changes: 13 additions & 1 deletion src/common-styles/sv-ranking.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
.sv-ranking-item--preview.sv-ranking-item--preview {
cursor: initial;
user-select: initial;
-webkit-user-select: initial;
-webkit-user-select: initial;

.sv-ranking-item__icon-container.sv-ranking-item__icon-container {
.sv-ranking-item__icon.sv-ranking-item__icon {
Expand Down Expand Up @@ -248,6 +248,18 @@
}
}

.sv-ranking-shortcut {
cursor: grabbing;
position: absolute;
z-index: 10000;
border-radius: calc(12.5 * var(--sjs-base-unit, var(--base-unit, 8px)));
min-width: 100px;
max-width: 400px;
box-shadow: var(--sjs-shadow-medium, 0px 2px 6px 0px rgba(0, 0, 0, 0.1)), var(--sjs-shadow-large, 0px 8px 16px 0px rgba(0, 0, 0, 0.1));
background-color: var(--sjs-general-backcolor, var(--background, #fff));
font-family: var(--sjs-font-family, var(--font-family, var(--sjs-default-font-family)));
}

.sv-ranking--select-to-rank {
display: flex;
}
Expand Down
11 changes: 0 additions & 11 deletions src/dragdrop/ranking-choices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@ export class DragDropRankingChoices extends DragDropChoices {
if(!draggedElementShortcut) return;

draggedElementShortcut.className = this.shortcutClass + " sv-ranking-shortcut";
draggedElementShortcut.style.cssText = `
cursor: grabbing;
position: absolute;
z-index: 10000;
border-radius: calc(12.5 * var(--sjs-base-unit, var(--base-unit, 8px)));
min-width: 100px;
max-width: 400px;
box-shadow: var(--sjs-shadow-medium, 0px 2px 6px 0px rgba(0, 0, 0, 0.1)), var(--sjs-shadow-large, 0px 8px 16px 0px rgba(0, 0, 0, 0.1));
background-color: var(--sjs-general-backcolor, var(--background, #fff));
font-family: var(--sjs-font-family, var(--font-family, var(--sjs-default-font-family)));
`;

const isDeepClone = true;
const clone = <HTMLElement>draggedElementNode.cloneNode(isDeepClone);
Expand Down
1 change: 1 addition & 0 deletions src/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ $font-family: var(--font-family, var(--sjs-default-font-family));
@import "./common-styles/sv-brand-info.scss";
@import "./common-styles/sv-drag-drop.scss";
@import "./common-styles/sv-save-data.scss";
@import "./common-styles/sv-ranking.scss";

$header-background-color: #e7e7e7;
$body-container-background-color: #f4f4f4;
Expand Down

0 comments on commit dc2d847

Please sign in to comment.