Przeglądaj źródła

fix: immersive animate from ↓↑ to ↓

Hugh Harlequin 2 lat temu
rodzic
commit
5ba9be0550

+ 0 - 2
package/css/awselect.css

@@ -163,8 +163,6 @@ Github: https://github.com/prevwong/awesome-select/
     transition: none !important; }
   .awselect.animate > .expand_frame, .awselect.animating > .expand_frame {
     display: block; }
-  .awselect:not(.expand) > .expand_frame {
-    display: none; }
   .awselect:not(.expand) > .expand_background {
     transform: scaleY(0); }
   .awselect:not(.animate) > .frame > .content > .value + .placeholder {

Plik diff jest za duży
+ 0 - 0
package/css/awselect.css.map


+ 1 - 6
package/css/awselect.scss

@@ -210,13 +210,8 @@ transition: 0.2s ease-in;
 	&.animating > .expand_frame{
 		display: block;
 	}
-	&:not(.expand) {
-		> .expand_frame{
-			display: none;
-		}
-		> .expand_background {
+	&:not(.expand) > .expand_background {
 			transform: scaleY(0);
-		}
 	}
 
 	&:not(.animate) > .frame > .content > .value + .placeholder {

+ 1 - 3
package/js/awselect.js

@@ -65,8 +65,6 @@ HTMLSelectElement.prototype.awselect = {
         setTimeout(function() {
             let expand_frame = this.expand_frame;
             this.classList.add('expand');
-            (document.documentElement.clientWidth < mobile_width || immersive) &&
-            (this.style.top = parseInt(this.style.top) - expand_frame.clientHeight + 'px');
 
             this.classList.add("placeholder_animate");
             setTimeout(function() {
@@ -129,7 +127,7 @@ HTMLSelectElement.prototype.awselect = {
             setTimeout(function() {
                 this.style.width = (window.innerWidth < mobile_width ? window.innerWidth - 40 : window.innerWidth / 2) + 'px';
                 Object.assign(this.style,{
-                    top: (window.innerHeight / 2 + this.clientHeight / 2) + 'px',
+                    top: (window.innerHeight / 2 + this.clientHeight / 2 - this.expand_frame.clientHeight) + 'px',
                     left: '50%',
                     transform: 'translateX(-50%) translateY(-50%)',
                 });

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików