Skip to content

Commit 2daab67

Browse files
committed
cleanup and extra bound filter
1 parent fc33deb commit 2daab67

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

string-bean/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ where
143143
(self.line_algorithm)(src.0, src.1, dst.0, dst.1)
144144
.into_iter()
145145
.filter(|((x, y), _)| *x < self.image_width && *y < self.image_height)
146+
.filter(|((x, y), _)| *x + *y * self.image_height < self.image_mask_inverted.len())
146147
.collect()
147148
}
148149
}

web/src/routes/+page.svelte

+6-4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
return circle_anchors(num_anchors, width, height, Math.min(width, height) / 2);
4848
case SHAPES.RECTANGLE:
4949
return rectangle_anchors(num_anchors, width, height);
50+
default:
51+
return circle_anchors(num_anchors, width, height, Math.min(width, height) / 2);
5052
}
5153
}
5254
@@ -188,7 +190,7 @@
188190
{#if state == STATES.UPLOAD}
189191
<div class="w-screen h-screen flex p-4">
190192
<div class="m-auto flex flex-col">
191-
<h1 class="title">string-bean</h1>
193+
<h1 class="title text-5xl pb-10">🧵string-bean</h1>
192194
<div class="flex">
193195
<label for="upload-button" class="btn btn-outline btn-success m-auto">
194196
<span> Upload Image </span>
@@ -304,16 +306,16 @@
304306
</div>
305307
</div>
306308
</div>
309+
310+
<h1 class="title">🧵string-bean</h1>
307311
</div>
308312
{/if}
309313

310314
<style>
311315
.title {
312-
font-size: 3rem;
313316
font-weight: bolder;
314-
background: -webkit-linear-gradient(#25af75, #51ffbc);
317+
background: -webkit-linear-gradient(#5fffc2, #0e5839);
315318
background-clip: text;
316319
-webkit-text-fill-color: transparent;
317-
padding-bottom: 1rem;
318320
}
319321
</style>

web/tailwind.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
module.exports = {
33
mode: 'jit',
44
content: ['./src/**/*.{html,js,svelte,ts}'],
5-
darkMode: false, // or 'media' or 'class'
65
theme: {},
76
daisyui: {
87
themes: ["night"],

0 commit comments

Comments
 (0)