Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #32 from Laaouatni/line-animation-on-generate-Gcss
Browse files Browse the repository at this point in the history
fix #31 added line animation on generate
  • Loading branch information
Laaouatni authored Aug 21, 2022
2 parents ed178f7 + f4efe41 commit ff36526
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
4 changes: 3 additions & 1 deletion gcode/src/API/GcodeApi/Gsimulator/Gcss/CssLine/CssLine.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ export default class CssLine {
top: `${this.smallestPos.y}px`,
rotate: `${this.lineAngle}deg`,
backgroundColor: "var(--sky-200)",
zIndex: `${GcodeAPI.array.length - this.index}`
zIndex: `${GcodeAPI.array.length - this.index}`,
key: `${this.index}`,
animSpeed: "100ms",
};

this.stylesKeysArray = Object.keys(this.lineStylesObj);
Expand Down
21 changes: 20 additions & 1 deletion gcode/src/CSS/Gline/Gline_main/Gline_main.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
}

.Gline {
/*here was var(--line-width)*/
width: var(--line-width);
height: var(--line-height);
}
Expand All @@ -14,4 +15,22 @@
left: var(--line-left);
transform: rotate(var(--line-rotate));
z-index: var(--line-zIndex);
}
}

.Gline {
width: 0;
opacity: 0;
animation: gline var(--line-animSpeed) ease-in-out forwards;
animation-delay: calc(var(--line-animSpeed) * var(--line-key));
}

@keyframes gline {
0% {
opacity: 0;
width: 0;
}
100% {
width: var(--line-width);
opacity: 1;
}
}

1 comment on commit ff36526

@vercel
Copy link

@vercel vercel bot commented on ff36526 Aug 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

gcode-js – ./

gcode-js-git-main-laaouatni.vercel.app
gcode-js.vercel.app
gcode-js-laaouatni.vercel.app

Please sign in to comment.