소스 검색

Merge pull request #2574 from christian-classics-ethereal-library/getComputedSlideSize

API: Expose getComputedSlideSize so plugin developers can get width and height.
Hakim El Hattab 5 년 전
부모
커밋
a2155e4fde
2개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      README.md
  2. 1 0
      js/reveal.js

+ 2 - 0
README.md

@@ -682,6 +682,8 @@ Reveal.getConfig();
 // Fetch the current scale of the presentation
 Reveal.getScale();
 
+Reveal.getComputedSlideSize(); // Returns object with width, height keys, and (scaled) presentationWidth and presentationHeight.
+
 // Retrieves the previous and current slide elements
 Reveal.getPreviousSlide();
 Reveal.getCurrentSlide();

+ 1 - 0
js/reveal.js

@@ -6576,6 +6576,7 @@
 		getScale: function() {
 			return scale;
 		},
+		getComputedSlideSize: getComputedSlideSize,
 
 		// Returns the current configuration object
 		getConfig: function() {