Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Bead Generation Site
Manage
Activity
Members
Labels
Plan
Issues
8
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Claire
Bead Generation Site
Commits
67c8b86a
Commit
67c8b86a
authored
2 years ago
by
Albert Dong
Browse files
Options
Downloads
Patches
Plain Diff
angle editor is its own component
parent
8b8806b0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/lib/AngleEditor.svelte
+48
-0
48 additions, 0 deletions
frontend/src/lib/AngleEditor.svelte
with
48 additions
and
0 deletions
frontend/src/lib/AngleEditor.svelte
0 → 100644
+
48
−
0
View file @
67c8b86a
<script
lang=
"ts"
>
export
let
current_angle_input
:
number
;
export
let
angles
:
number
[];
</script>
<label
for=
"angle-input"
>
Angle Editor
</label>
<div
class=
"flex flex-row"
>
<input
name=
"angle-input"
class=
"flex-1 h-10 min-w-0 bg-purple-100"
type=
"number"
bind:value=
{
current_angle_input
}
/>
<button
class=
"h-10 rounded-full w-1/4 bg-rose-300 flex flex-row items-center justify-center"
on:click=
{
()
=>
{
if
(
!
angles
.
includes
(
current_angle_input
))
{
angles
.
push
(
current_angle_input
);
angles
=
angles
;
}
}}
>
<svg
class=
"fill-current w-4 h-4 mr-1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 24 24"
><path
d=
"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
/>
</svg>
Add
</button
>
<button
class=
"h-10 rounded-full w-1/4 bg-rose-500 flex flex-row items-center justify-center"
on:click=
{
()
=>
{
angles
=
[
0
];
}
}
>
<svg
class=
"fill-current w-4 h-4 mr-1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 24 24"
><path
d=
"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
/>
</svg>
Reset
</button>
</div>
<p>
Current Angles:
{
angles
}
</p>
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment