function to add units

This commit is contained in:
David Botton 2021-02-10 19:57:43 -05:00
parent 6867f705fa
commit 2c7ad56f20
3 changed files with 28 additions and 13 deletions

View file

@ -46,8 +46,8 @@
(let* ((app (connection-data-item obj "app-data"))
(x (getf data ':screen-x))
(y (getf data ':screen-y)))
(setf (top obj) (format nil "~Apx" (- y (drag-y app))))
(setf (left obj) (format nil "~Apx" (- x (drag-x app))))))
(setf (top obj) (unit :px (- y (drag-y app))))
(setf (left obj) (unit :px (- x (drag-x app))))))
(defun on-mouse-leave (obj)
(let ((app (connection-data-item obj "app-data")))