This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from Laaouatni/making-popup-animate-transition
fix #33 Making popup animate transition
- Loading branch information
Showing
6 changed files
with
43 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,44 @@ | ||
const t0 = performance.now(); | ||
// import GcodeAPI from "./src/API/GcodeApi/GcodeAPI_main/GcodeAPI"; | ||
|
||
import GcodeAPI from "./src/API/GcodeApi/GcodeAPI_main/GcodeAPI"; | ||
|
||
import G0 from "./src/API/GcodeApi/Gcommands/G/G0"; | ||
import Gcss from "./src/API/GcodeApi/Gsimulator/Gcss/Gcss.js"; | ||
|
||
let a = new G0({}); | ||
|
||
for (let i = 0; i < 9; i++) { | ||
if (i % 2 == 0) { | ||
a.moveTo({ left: Math.random() * 100, top: Math.random() * 50 }); | ||
} else { | ||
a.moveTo({ top: Math.random() * 100, left: Math.random() * 50 }); | ||
} | ||
a.moveTo({ left: 50, top: 10*i}); | ||
} | ||
|
||
|
||
let g = new Gcss({ | ||
width: 500, | ||
height: 500, | ||
parentHtmlContainer: document.querySelector("section"), | ||
}); | ||
|
||
let btn = document.querySelector("#btn") | ||
g.generate(); | ||
|
||
btn.addEventListener("click", btnGenerate, { once: true }); | ||
|
||
function btnGenerate() { | ||
let g = new Gcss({ | ||
width: 500, | ||
height: 500, | ||
parentHtmlContainer: document.querySelector("section"), | ||
}); | ||
const t1 = performance.now(); | ||
console.log(`Call to doSomething took ${t1 - t0} milliseconds.`); | ||
console.table(GcodeAPI.array); | ||
|
||
g.generate(); | ||
|
||
btn.disabled = true; | ||
} | ||
const t1 = performance.now(); | ||
console.log(`Call to doSomething took ${t1 - t0} milliseconds.`); | ||
|
||
|
||
// let btn = document.querySelector("#btn") | ||
|
||
// btn.addEventListener("click", btnGenerate, { once: true }); | ||
|
||
// function btnGenerate() { | ||
// let g = new Gcss({ | ||
// width: 500, | ||
// height: 500, | ||
// parentHtmlContainer: document.querySelector("section"), | ||
// }); | ||
|
||
// g.generate(); | ||
|
||
// btn.disabled = true; | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#arrow { | ||
background-color: var(--sky-50); | ||
border-radius: 0.2rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3df6501
There was a problem hiding this comment.
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.vercel.app
gcode-js-laaouatni.vercel.app
gcode-js-git-main-laaouatni.vercel.app