Skip to content

Commit a967fc3

Browse files
committed
Show layers that are excluded with strike-through
1 parent fdd7a6d commit a967fc3

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/App.svelte

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
minExtrusionSpeed,
4646
maxExtrusionSpeed,
4747
minFlow,
48-
maxFlow } = aggregateLayerStats(analyzedLayers));
48+
maxFlow } = aggregateLayerStats(analyzedLayers, skipFirstLayers, skipLastLayers));
4949
$: tempChanges = generateTempChanges(analyzedLayers, minFlow, maxFlow, minTemp, maxTemp, tempInc, skipFirstLayers, skipLastLayers);
50-
50+
5151
// init()
5252
5353
onMount(() => {
@@ -282,6 +282,11 @@
282282
FileSaver.saveAs(blob, "hello world.gcode");
283283
}
284284
285+
function isLayerExcluded(layerIndex) {
286+
// console.log(layerIndex, skipFirstLayers, layerIndex < skipFirstLayers);
287+
return layerIndex < skipFirstLayers || layerIndex > (analyzedLayers.length -1 - skipLastLayers);
288+
}
289+
285290
</script>
286291

287292
<main>
@@ -393,7 +398,8 @@
393398
</tr>
394399
{#each analyzedLayers as layer, index}
395400
{#if tempChanges[index] || showAllLayers}
396-
<tr class={!tempChanges[index] ? 'subtle' : ''}>
401+
402+
<tr class:subtle={!tempChanges[index]} class:excludedLayer={isLayerExcluded(index, skipFirstLayers, skipLastLayers)} >
397403
<td>{index +1}</td>
398404
<td>{layer.z}</td>
399405
<td>{layer.lineNumber}</td>
@@ -485,6 +491,10 @@
485491
color: grey;
486492
}
487493
494+
.excludedLayer {
495+
text-decoration: line-through;
496+
}
497+
488498
button {
489499
color: #fff;
490500
background-color: #ff5900;

0 commit comments

Comments
 (0)