Fork me on GitHub
#reagent
<
2016-01-26
>
pepe09:01:53

@mihaelkonjevic: it looks pretty interesting. I will try to dig a little deeper later. Thank you.

mihaelkonjevic10:01:38

@pepe: I will work on the readme and docs these days, so make sure you ask me if anything is not clear. I really want to write good docs for this

pepe10:01:41

@mihaelkonjevic: only question I have, why you do not use github? Just for my info, nothing against bitbucket 😉

mihaelkonjevic10:01:41

Because of the free private repos :) they were not public until yesterday. I'll be moving it to github soon

nbdam10:01:06

@mihaelkonjevic: read the overview... nice work, i like the routing concepts. will read the sample project when time permits... btw. dobro ime:)

valicimpoeru12:01:19

Hi Clojurians! simple_smile I have a little problem... I'm trying to make a draggable div but I don't succeeded to put on-drag event. My code looks like this: (defn resizable-handle [state] (let [id (str "handler_" (rand 10000))] (r/create-class { :reagent-render (fn [state] [:div.ui-resizable-div { :id id :style { :marginLeft (- (int (get-in state [:user :column_size])) 10) } } ] ) :component-did-mount ( fn [this] (.draggable (js/$ (r/dom-node this) ;; {:axis "x" ;; :onDrag (fn[event] ;; (print 1 event (.-clientX event)) ;; ) ;; } ) { :on-drag (fn[event] (print 12 event (.-clientX event)) ) } ) ) } ) ) )

valicimpoeru12:01:36

Can anyone tell me what am I doing wrong? Thnaks!

mbertheau12:01:15

You're putting closing parens and brackets on a single line. They're very lonely like this! simple_smile

valicimpoeru12:01:46

I found the problem. (defn resizable-handle [state] (let [id (str "handler_" (rand 10000))] (r/create-class { :reagent-render (fn [state] [:div.ui-resizable-div { :id id :style { :marginLeft (- (int (get-in state [:user :column_size])) 10) } } ] ) :component-did-mount ( fn [this] (.draggable (js/$ ".ui-resizable-div") (clj->js { ;; :onDrag (fn[] (print 10)) ;; :on-drag (fn[] (print 11)) ;; :on_drag (fn[] (print 11)) ;; :stop (print 1111) :drag (fn[event, ui] (print 12 event (.-clientX event)) ) }) ) ) } ) ) )

pepe12:01:46

@valicimpoeru: please take look at formating code on slack. And as @mbertheau pointed out, consider collecting parens and brackets on single line. It will much more readable. Thank you

valicimpoeru13:01:48

Ok, thank you for observation and sorry!

pepe13:01:36

no problem 😉. Just that it is much easier to help then