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

[Chalkboard] Percentage units for the aspect ratio do not work #104

Open
jwarz opened this issue Nov 10, 2020 · 5 comments
Open

[Chalkboard] Percentage units for the aspect ratio do not work #104

jwarz opened this issue Nov 10, 2020 · 5 comments

Comments

@jwarz
Copy link

jwarz commented Nov 10, 2020

The chalkboard using percentage units does not work. Only absolute values for the aspect ratio can be supplied. Is there a workaround to fit the chalkboard to different resolutions?

Working Example:

Reveal.initialize({

  width: 960,
  height: 700,

  margin: 0.04,

  minScale: 0.2,
  maxScale: 2.0

  chalkboard: {
			        src: "plugin/chalkboard/chalkboard.json",
		        }

});

Non working Example:

Reveal.initialize({

  width: 100%,
  height: 100%,

  margin: 0.04,

  minScale: 0.2,
  maxScale: 2.0

  chalkboard: {
			        src: "plugin/chalkboard/chalkboard.json",
		        }

});
@pfisterer
Copy link
Contributor

pfisterer commented Jul 16, 2021

I have a similar issue. However, I do not specify any width/height explicitly but I am using reveal's default settings. The chalkboard used to work with a previous version but with the recent one, it stopped working correctly and the coordinates seem to be wrong. I've recorded a short screencast to demonstrate the issue:

chalkboard

@rajgoel
Copy link
Owner

rajgoel commented Jul 16, 2021

@pfisterer Thanks for the screencast. Does the demo work correctly for you? If yes, do you have a clue what's different? If no, can you provide information on browser, os, etc so that I might reproduce the issue?

@pfisterer
Copy link
Contributor

pfisterer commented Jul 16, 2021

@rajgoel Thanks for looking into it. Your demo does actually work. A non-working example is available here. I've tested using the latest Chrome and Firefox on macOS. I'm dumping the settings passed to Reveal.initialize using console.log.

@rajgoel
Copy link
Owner

rajgoel commented Jul 16, 2021

@pfisterer Your issue is probably not related to this thread. Please let us continue the discussion at #124 .

@rajgoel
Copy link
Owner

rajgoel commented Jul 16, 2021

Regarding the original issue of this thread, the reason is probably that the chalkboard plugin must know the aspect ratio for proper scaling for playback and broadcast with different screen sizes. A percentage width & height do not provide this information, absolute values do. As soon as there is clarity of whether this is the actual reason or whether there is a reasonable workaround, the documentation should be updated accordingly.

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

No branches or pull requests

3 participants