mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-15 15:00:24 -08:00
Handle full screen changes and maximize and orientation changes on mobile
This commit is contained in:
parent
64d7723702
commit
38f533d51e
3 changed files with 32 additions and 1 deletions
|
|
@ -208,3 +208,19 @@ clog-document object. (Private)"))
|
|||
|
||||
(defmethod new-line ((obj clog-document))
|
||||
(execute obj (format nil "writeln('<\br>')")))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; set-on-full-screen-change ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defgeneric set-on-full-screen-change (clog-document
|
||||
on-full-screen-change-handler)
|
||||
(:documentation "Set the ON-FULL-SCREEN-CHANGE-HANDLER for CLOG-OBJ.
|
||||
If ON-FULL-SCREEN-CHANGE-HANDLER is nil unbind the event."))
|
||||
|
||||
(defmethod set-on-full-screen-change ((obj clog-document) handler)
|
||||
(set-event obj "fullscreenchange"
|
||||
(when handler
|
||||
(lambda (data)
|
||||
(declare (ignore data))
|
||||
(funcall handler obj)))))
|
||||
|
|
|
|||
|
|
@ -87,6 +87,18 @@
|
|||
(jquery-ui "/js/jquery-ui.js"))
|
||||
"Initializes clog-gui and installs a clog-gui object on connection."
|
||||
(create-clog-gui clog-body)
|
||||
(set-on-full-screen-change (html-document clog-body)
|
||||
(lambda (obj)
|
||||
(when (current-window obj)
|
||||
(when (last-width (current-window obj))
|
||||
(window-normalize (current-window obj))
|
||||
(window-maximize (current-window obj))))))
|
||||
(set-on-orientation-change (window clog-body)
|
||||
(lambda (obj)
|
||||
(when (current-window obj)
|
||||
(when (last-width (current-window obj))
|
||||
(window-normalize (current-window obj))
|
||||
(window-maximize (current-window obj))))))
|
||||
(when w3-css-url
|
||||
(load-css (html-document clog-body) w3-css-url))
|
||||
(when jquery-ui-css
|
||||
|
|
|
|||
|
|
@ -768,7 +768,10 @@ embedded in a native template application.)"
|
|||
(put generic-function)
|
||||
(put-line generic-function)
|
||||
(put-br generic-function)
|
||||
(new-line generic-function))
|
||||
(new-line generic-function)
|
||||
|
||||
"CLOG-Document - Events"
|
||||
(set-on-full-screen-change generic-function))
|
||||
|
||||
(defsection @clog-navigator (:title "CLOG Navigator Objects")
|
||||
"CLOG-Navigator - CLOG Navigator Objects"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue