mirror of https://github.com/yjwen/org-reveal.git
Merge pull request #357 from whatacold/support-percentage-width
Fix #356: support width and height in percentage.
This commit is contained in:
commit
29588ebf26
|
@ -664,11 +664,15 @@ overview: %s,
|
||||||
|
|
||||||
;; slide width
|
;; slide width
|
||||||
(let ((width (plist-get info :reveal-width)))
|
(let ((width (plist-get info :reveal-width)))
|
||||||
(if (> width 0) (format "width: %d,\n" width) ""))
|
(cond ((and (integerp width) (> width 0)) (format "width: %d,\n" width))
|
||||||
|
((stringp width) (format "width: '%s',\n" width))
|
||||||
|
(t "")))
|
||||||
|
|
||||||
;; slide height
|
;; slide height
|
||||||
(let ((height (plist-get info :reveal-height)))
|
(let ((height (plist-get info :reveal-height)))
|
||||||
(if (> height 0) (format "height: %d,\n" height) ""))
|
(cond ((and (integerp height) (> height 0)) (format "height: %d,\n" height))
|
||||||
|
((stringp height) (format "height: '%s',\n" height))
|
||||||
|
(t "")))
|
||||||
|
|
||||||
;; slide margin
|
;; slide margin
|
||||||
(let ((margin (string-to-number (plist-get info :reveal-margin))))
|
(let ((margin (string-to-number (plist-get info :reveal-margin))))
|
||||||
|
|
Loading…
Reference in New Issue