diff --git a/source/clog-base.lisp b/source/clog-base.lisp index b0bc7b9..7740e27 100644 --- a/source/clog-base.lisp +++ b/source/clog-base.lisp @@ -308,6 +308,7 @@ result or if time out DEFAULT-ANSWER (Private)")) (defparameter drop-event-script "+ (e.clientX - e.currentTarget.getBoundingClientRect().left + e.currentTarget.scrollLeft) + ':' + (e.clientY - e.currentTarget.getBoundingClientRect().top + e.currentTarget.scrollTop) + ':' + + e.which + ':' + e.altKey + ':' + e.ctrlKey + ':' + e.shiftKey + ':' + e.metaKey + ':' + encodeURIComponent(e.originalEvent.dataTransfer.getData('~A'))" "JavaScript to collect drop event data from browser.") @@ -317,7 +318,12 @@ result or if time out DEFAULT-ANSWER (Private)")) :event-type :drop :x (parse-integer (nth 0 f) :junk-allowed t) :y (parse-integer (nth 1 f) :junk-allowed t) - :drag-data (quri:url-decode (or (nth 2 f) ""))))) + :which-button (parse-integer (nth 2 f) :junk-allowed t) + :alt-key (js-true-p (nth 3 f)) + :ctrl-key (js-true-p (nth 4 f)) + :shift-key (js-true-p (nth 5 f)) + :meta-key (js-true-p (nth 6 f)) + :drag-data (quri:url-decode (or (nth 7 f) ""))))) ;;;;;;;;;;;;;;; ;; set-event ;; diff --git a/tools/clog-builder.lisp b/tools/clog-builder.lisp index 3114b76..9f76dd6 100644 --- a/tools/clog-builder.lisp +++ b/tools/clog-builder.lisp @@ -59,7 +59,9 @@ :create clog:create-div :create-type :element :create-content "" - :properties ((:name "positioning" + :properties ((:name "text" + :prop clog:text) + (:name "positioning" :prop clog:positioning) (:name "color" :prop clog:color) @@ -396,7 +398,9 @@ of controls and double click to select control." (control2 (attach-as-child obj (getf data :drag-data))) (placer1 (get-placer control1)) (placer2 (get-placer control2))) - (place-before control1 control2) + (if (getf data :shift-key) + (place-inside-bottom-of control1 control2) + (place-before control1 control2)) (place-after control2 placer2) (set-geometry placer1 :top (position-top control1) :left (position-left control1)