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

Allow to specify zoom level on a per-step basis #99

Open
vlsi opened this issue Jul 1, 2020 · 0 comments
Open

Allow to specify zoom level on a per-step basis #99

vlsi opened this issue Jul 1, 2020 · 0 comments

Comments

@vlsi
Copy link

vlsi commented Jul 1, 2020

It is great that Code Surfer can figure out the proper zoom level so the contents fits to the screen, however it does not work great when CodeSurfer instances are located on different slides (e.g. with different highlight language).

It would be great if there was a way to specify minZoom and/or maxZoom so different CodeSurfer instances could look alike.

This looks like #97, however, columns should probably negotiate the font size automatically (e.g. select the minimum between the columns), while this issue is more on "manually aligning font size across different slides".

Sample. Note: CodeSurfer can't switch between languages across steps, and it can't "add a single - sign to a line" yet, so I use different slides which results in layout jumps.

<CodeSurfer>

```java
@Test
public void now_ZoneId__uses_system_time() {
    ZoneId zone = ZoneId.of("UTC+01:02:03");
    LocalDateTime expected = LocalDateTime.now(Clock.system(zone));
    LocalDateTime test = LocalDateTime.now(zone);
    assertEquals(
      test.truncatedTo(ChronoUnit.SECONDS),
      expected.truncatedTo(ChronoUnit.SECONDS),
      "now(ZoneId)==$expected should be similar to now(Clock)==$test"
    );
}
```

</CodeSurfer>

---

<CodeSurfer>

```diff
@Test
public void now_ZoneId__uses_system_time() {
    ZoneId zone = ZoneId.of("UTC+01:02:03");
    LocalDateTime expected = LocalDateTime.now(Clock.system(zone));
    LocalDateTime test = LocalDateTime.now(zone);
    assertEquals(
      test.truncatedTo(ChronoUnit.SECONDS),
      expected.truncatedTo(ChronoUnit.SECONDS),
-      "now(ZoneId)==$expected should be similar to now(Clock)==$test"
    );
}
```

</CodeSurfer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant