Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ToolBar.svelte #78

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions applications/web/src/components/ToolBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

let solving = false
// todo ask Matt why is this a no-op?
Comment on lines 8 to 9
Copy link
Collaborator

Choose a reason for hiding this comment

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

Some more things you could remove here

Copy link
Collaborator

Choose a reason for hiding this comment

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

And further down in the file too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@av8ta plz review I have made few more changes.

const solveSketch = () => {}
const createNewExtrusion = () => {
newExtrusion()
// set that as the current feature being edited
Expand All @@ -18,7 +17,6 @@
newSketchOnPlane()
$featureIndex = $workbench.history.length - 1
}
const stepSketch = () => {}
const debugging = false

const actions = [
Expand All @@ -33,8 +31,6 @@
]

const sketchActions = [
{alt: "solve", src: `${base}/actions/solve_min.svg`, text: "Solve", handler: solveSketch},
{alt: "step", src: `${base}/actions/step_min.svg`, text: "Step", handler: stepSketch},
{alt: "line", src: `${base}/actions/line.svg`, handler: () => ($sketchTool = "line")},
{alt: "circle", src: `${base}/actions/circle.svg`, handler: () => ($sketchTool = "circle")},
{alt: "rectangle", src: `${base}/actions/rectangle.svg`, handler: () => ($sketchTool = "rectangle")},
Expand All @@ -50,7 +46,7 @@
{/each}
{:else}
{#each actions as action}
<button class="inline-flex items-center {action.text === 'Solve' && solving ? 'bg-gray-400' : ''} hover:bg-gray-200 p-1" on:click={action.handler}>
<button class="inline-flex items-center hover:bg-gray-200 p-1" on:click={action.handler}>
<img class="h-8 w-8" src={action.src} alt={action.alt} />{action.text ? action.text : ""}
</button>
{/each}
Expand Down