Skip to content

Commit

Permalink
introduce non-transformed pipes and 0 rotation
Browse files Browse the repository at this point in the history
as opposed to undefined rotation which was probably NaNing
fixes #13
  • Loading branch information
gordonwoodhull committed Oct 7, 2023
1 parent 6ae5e3a commit 19490fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/header/ExampleTile.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
const outlineWidth = grid.STROKE_WIDTH * 2 + grid.PIPE_WIDTH;
const pipeWidth = grid.PIPE_WIDTH;
const useArmsRotation = grid.getGridFlag('ARMS_ROTATION');
let path = grid.getPipesPath(tile, i);
let path = grid.getPipesPath(tile, i, 0);
const isSink = grid.getDirections(tile, 0, i).length === 1;
const tile_transform = grid.getTileTransformCSS(i) || '';
const pipe_transform = useArmsRotation ? '' : tile_transform;
const style = grid.polygon_at(i).style || undefined;
</script>

Expand All @@ -33,7 +35,7 @@
<!-- Pipe shape -->
<g
class="pipe"
style="transform: {tile_transform}"
style="transform: {pipe_transform}"
clip-path="url(#{[grid.KIND, 'clip', 'path', i].join('-')})"
>
<!-- Pipe outline -->
Expand Down

0 comments on commit 19490fd

Please sign in to comment.