Hi,
I am currently trying to make drag and drop work with freactive, but fail so
far. This is my code:
[:thead [:tr
(for [col (first (:content struct))]
[:td [:div {:draggable true
:on-drag-start (fn [e] (println "dragged"))
:on-drag-over (fn [e] (.preventDefault e))
:on-drag-enter (fn [e] (.preventDefault e))
:on-drop (fn [e] (.preventDefault e)(println
"dropped"))
:on-drag-end (fn [_] (println "drag end"))}
col]
])]]
But nothing happens, no matter what I try. Are there any restrictions? Should
this be done in a different way?
Best Regards,
Sven
Am Montag, 17. November 2014 03:20:29 UTC+1 schrieb Aaron Craelius:
> freactive (pronounced "f reactive" for functional reactive) is a new high
> performance, pure Clojurescript, declarative DOM library:
> https://github.com/aaronc/freactive
>
> It has a syntax very similar to that of Reagent and was in fact inspired by
> Reagent, Om, and others.
>
> I came up with it when I was doing some DOM programming after having spending
> a fair amount of time working with JavaFX (see my soon to be announced
> library fx-clj: https://github.com/aaronc/fx-clj). I thought Om and Reagent
> were very nice to work with (and actually inspired some what I did with
> fx-clj), but I felt from my desktop GUI experience, that I could take things
> a few steps further.
>
> freactive's main advantages over existing solutions are probably built-in
> animations support and slightly higher performance.
>
> Here are it's goals from the README:
> Provide a simple, intuitive API that should be almost obvious to those
> familiar with Clojure (inspiration from reagent)Allow for high-performance
> rendering good enough for animated graphics based on a purely declarative
> syntaxAllow for reactive binding of any attribute, style property or child
> node
> Allow for coordinated management of state via cursors (inspiration from
> om)Provide deeply-integrated animation supportAllow for cursors based on
> paths as well as lenses
> Provide a generic items view component for efficient viewing of large data
> sets
> Minimize unnecessary triggering of update eventsCoordinate all updates via
> requestAnimationFrame wherever possibleBe easy to debug
> Be written in pure Clojurescript
> Provide support for older browsers via polyfills (not yet implemented)
> Any feedback is welcome!!
> I'm not sure I like the name "freactive" - but it was the best I could think
> of at the time. Suggestions for alternative names are welcome.
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.