Rotationsrichtung in beide Richtungen möglich
This commit is contained in:
@@ -86,7 +86,7 @@ $coinTowerDimension: 28px;
|
||||
|
||||
//Segments
|
||||
$rotationDegrees: (90 180 270 360);
|
||||
$animationDuration: 0.25s;
|
||||
$animationDuration: .25s;
|
||||
|
||||
@for $i from 1 through 10 {
|
||||
$value: percentage($i/10);
|
||||
@@ -109,6 +109,15 @@ $animationDuration: 0.25s;
|
||||
transform: rotate(#{nth($rotationDegrees, $i)}deg);
|
||||
}
|
||||
}
|
||||
@keyframes rotate-reverse-#{nth($rotationDegrees, $i)} {
|
||||
0% {
|
||||
transform: rotate(#{(nth($rotationDegrees, $i))+90}deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(#{$startDegree+90}deg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.segment:not(.segment-row):not(.segment-triangle) {
|
||||
@@ -139,6 +148,23 @@ $animationDuration: 0.25s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.reverse{
|
||||
//animation-name: rotate-reverse-#{(nth($rotationDegrees, $i))%360+90};
|
||||
animation-name: rotate-reverse-#{nth($rotationDegrees, $i)};
|
||||
> .child-container {
|
||||
> .segment {
|
||||
//animation-name: rotate-reverse-#{360- (nth($rotationDegrees, $i)%360)};
|
||||
animation-name: rotate-reverse-#{(540- nth($rotationDegrees, $i))%360+90};
|
||||
@for $j from 1 through length($rotationDegrees) {
|
||||
$animationName: ((nth($rotationDegrees, $j)- nth($rotationDegrees, $i)+360)%360)+90;
|
||||
&.rotate-#{nth($rotationDegrees, $j)} {
|
||||
animation-name: rotate-reverse-#{($animationName+90)%360+90};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,6 +197,10 @@ $animationDuration: 0.25s;
|
||||
animation-duration: $animationDuration;
|
||||
animation-fill-mode: forwards;
|
||||
animation-timing-function: linear;
|
||||
|
||||
&.reverse{
|
||||
animation-name: rotate-reverse-#{$animationName};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user