mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
Add clog-panels and geometry
This commit is contained in:
parent
6fda91c501
commit
cb5bf951e9
5 changed files with 126 additions and 1 deletions
|
|
@ -1370,6 +1370,30 @@ parent in the DOM."))
|
|||
(defmethod offset-left ((obj clog-element))
|
||||
(parse-integer (jquery-query obj "offset().left" :default-answer 0) :junk-allowed t))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;
|
||||
;; geometry ;;
|
||||
;;;;;;;;;;;;;;
|
||||
|
||||
(defgeneric geometry (clog-element &key x y width height units)
|
||||
(:documentation "Change the geometry :X :Y :WIDTH :HEIGHT each optional
|
||||
in UNITS (default :px)"))
|
||||
|
||||
(defmethod geometry ((obj clog-element) &key x y width height (units :px))
|
||||
(jquery-execute obj (format nil "css({~A~A~A~A})"
|
||||
(if x
|
||||
(format nil "'left':'~A~A'," x units)
|
||||
"")
|
||||
(if y
|
||||
(format nil "'top':'~A~A'," y units)
|
||||
"")
|
||||
(if width
|
||||
(format nil "'width':'~A~A'," width units)
|
||||
"")
|
||||
(if height
|
||||
(format nil "'height':'~A~A'," height units)
|
||||
""))))
|
||||
|
||||
;;;;;;;;;;
|
||||
;; left ;;
|
||||
;;;;;;;;;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue