From b46a05edf8ed7a0c4ef5ca801d127b280f832f44 Mon Sep 17 00:00:00 2001 From: NicolasRichel Date: Thu, 6 Jan 2022 11:11:46 +0100 Subject: [PATCH] PATCH: fix(icons): fix icon rotation --- .../BIMDataDropdownList.vue | 5 +++- .../_BIMDataDropdownList.scss | 30 ------------------- .../BIMDataIcon/BIMDataIcon.vue | 4 +-- 3 files changed, 5 insertions(+), 34 deletions(-) diff --git a/src/BIMDataComponents/BIMDataDropdownList/BIMDataDropdownList.vue b/src/BIMDataComponents/BIMDataDropdownList/BIMDataDropdownList.vue index 012e96a4..4836427f 100644 --- a/src/BIMDataComponents/BIMDataDropdownList/BIMDataDropdownList.vue +++ b/src/BIMDataComponents/BIMDataDropdownList/BIMDataDropdownList.vue @@ -21,7 +21,7 @@ width="21px" height="21px" > - + @@ -114,6 +114,9 @@ export default { "min-height": `${this.height}`, }; }, + iconRotation() { + return this.displayed ? (this.directionClass === "up" ? -90 : 90) : 0; + }, }, methods: { onHeaderClick() { diff --git a/src/BIMDataComponents/BIMDataDropdownList/_BIMDataDropdownList.scss b/src/BIMDataComponents/BIMDataDropdownList/_BIMDataDropdownList.scss index 3ee931d6..fd7e8697 100644 --- a/src/BIMDataComponents/BIMDataDropdownList/_BIMDataDropdownList.scss +++ b/src/BIMDataComponents/BIMDataDropdownList/_BIMDataDropdownList.scss @@ -28,11 +28,6 @@ background-color: var(--color-white); border: 1px solid transparent; box-shadow: var(--box-shadow); - .bimdata-btn { - svg { - transform: rotate(90deg); - } - } } &.disabled { @@ -45,31 +40,6 @@ } } - &[direction*="up"] { - .bimdata-dropdown-list__content { - &.active { - .bimdata-btn { - svg { - transform: rotate(-90deg); - } - } - } - } - } - - &[direction*="right"], - &[direction*="left"] { - .bimdata-dropdown-list__content { - &.active { - .bimdata-btn { - svg { - transform: none; - } - } - } - } - } - .bimdata-paginated-list { &__elements { font-size: 11px; diff --git a/src/BIMDataComponents/BIMDataIcon/BIMDataIcon.vue b/src/BIMDataComponents/BIMDataIcon/BIMDataIcon.vue index 92afb9d4..cb6a7a93 100644 --- a/src/BIMDataComponents/BIMDataIcon/BIMDataIcon.vue +++ b/src/BIMDataComponents/BIMDataIcon/BIMDataIcon.vue @@ -103,10 +103,8 @@ export default { height: `${pixelSize}px`, minHeight: `${pixelSize}px`, margin: `${this.margin}`, + transform: `rotate(${this.rotate}deg)`, }; - if (this.rotation > 0) { - style.transform = `rotate(${this.rotate}deg)`; - } return style; }, },