Skip to content

Commit

Permalink
Ranking Issues (#5900)
Browse files Browse the repository at this point in the history
* work for the #5782

* work for the #5782

* work for the #5782

* work for the #5782 (upd screens)
  • Loading branch information
dmitry-kurmanov authored Mar 31, 2023
1 parent 0d0f5a5 commit f629c08
Showing 11 changed files with 14 additions and 23 deletions.
16 changes: 9 additions & 7 deletions src/common-styles/sv-ranking.scss
Original file line number Diff line number Diff line change
@@ -42,11 +42,13 @@ $foreground-disabled: var(--foreground-disabled, rgba(#161616, 0.16));

.sv-ranking-item:focus .sv-ranking-item__icon--focus {
visibility: visible;
top: calcSize(0.6);
height: calcSize(3);
}

.sv-ranking-item:focus .sv-ranking-item__index {
background: $background;
border: calcSize(0.25) solid $primary;
outline: calcSize(0.25) solid $primary;
}

.sv-ranking-item__content.sv-ranking-item__content {
@@ -65,16 +67,13 @@ $foreground-disabled: var(--foreground-disabled, rgba(#161616, 0.16));
flex-shrink: 0;
width: calcSize(3);
height: calcSize(4);
margin-right: calcSize(1);
margin-left: calcSize(1);
}

.sv-ranking-item__icon.sv-ranking-item__icon {
visibility: hidden;
fill: $primary;
position: absolute;
top: calcSize(1);
margin-right: calcSize(1);
width: calcSize(1.75);
height: calcSize(2);
}
@@ -94,7 +93,7 @@ $foreground-disabled: var(--foreground-disabled, rgba(#161616, 0.16));
line-height: calcSize(3);
box-sizing: border-box;
font-weight: 600;
margin-left: calcSize(1);
margin-left: calcSize(0);

&.sv-ranking-item__index--empty:empty {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAArSURBVHgB7cuhEQAwDMNAtUN4//m8RMtygcE5PxMQxAKnh6Q3mWzXd4mAD4cJBAQCqfbUAAAAAElFTkSuQmCC");
@@ -199,13 +198,16 @@ $foreground-disabled: var(--foreground-disabled, rgba(#161616, 0.16));
margin-right: calcSize(4);
}

.sv-ranking-shortcut .sv-ranking-item__icon--hover {
.sv-ranking-shortcut .sv-ranking-item__icon--hover {
visibility: visible;
}

.sv-ranking-shortcut .sv-ranking-item__icon {
margin-left: calcSize(1);
width: calcSize(1.75);
height: calcSize(2);
top: calcSize(1);
}

.sv-ranking-shortcut .sv-ranking-item__icon-container {
margin-left: calcSize(1);
}
16 changes: 1 addition & 15 deletions src/defaultV2-theme/blocks/sd-ranking.scss
Original file line number Diff line number Diff line change
@@ -8,20 +8,6 @@
left: calcSize(-3);
}

.sd-element--with-frame .sv-ranking-item__icon {
margin-left: calcSize(1);
width: calcSize(1.75);
height: calcSize(2);
top: calcSize(1);
}

.sd-element--with-frame .sv-ranking-item__icon-container {
position: relative;
width: calcSize(3);
height: calcSize(4);
margin-right: calcSize(1);
margin-left: calcSize(1);
}

.sd-element--with-frame .sv-ranking--mobile {
.sv-ranking-item__icon-container {
@@ -43,4 +29,4 @@

.sv-ranking-item__content.sd-ranking-item__content {
line-height: calcSize(3);
}
}
1 change: 1 addition & 0 deletions src/dragdrop/choices.ts
Original file line number Diff line number Diff line change
@@ -69,6 +69,7 @@ export class DragDropChoices extends DragDropCore<QuestionSelectBase> {
cursor: grabbing;
position: absolute;
z-index: 1000;
filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1));
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
padding: 4px;
border-radius: 4px;
1 change: 1 addition & 0 deletions src/dragdrop/matrix-rows.ts
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ export class DragDropMatrixRows extends DragDropCore<QuestionMatrixDynamicModel>
const clone = <HTMLElement>(row.cloneNode(isDeepClone));

clone.style.cssText = `
filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1));
box-shadow: rgb(0 0 0 / 10%) 0px 8px 16px;
background-color: white;
display: flex;
3 changes: 2 additions & 1 deletion src/dragdrop/ranking-choices.ts
Original file line number Diff line number Diff line change
@@ -12,14 +12,15 @@ export class DragDropRankingChoices extends DragDropChoices {
draggedElementNode: HTMLElement,
event: PointerEvent
): HTMLElement {
const draggedElementShortcut:any = document.createElement("div");
const draggedElementShortcut: any = document.createElement("div");
draggedElementShortcut.className = this.shortcutClass + " sv-ranking-shortcut";
draggedElementShortcut.style.cssText = `
cursor: grabbing;
position: absolute;
z-index: 1000;
border-radius: 36px;
min-width: 100px;
filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1));
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
background-color: var(--background, white);
font-family: var(--font-family, $font-family);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f629c08

Please sign in to comment.