This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-16
Channels
- # admin-announcements (14)
- # announcements (1)
- # aws (1)
- # beginners (105)
- # boot (609)
- # braid-chat (4)
- # braveandtrue (3)
- # cider (24)
- # cljs-dev (13)
- # cljsrn (2)
- # clojure (142)
- # clojure-berlin (7)
- # clojure-ireland (7)
- # clojure-japan (10)
- # clojure-nl (4)
- # clojure-poland (76)
- # clojure-russia (198)
- # clojure-sg (4)
- # clojure-taiwan (1)
- # clojurebridge (1)
- # clojured (4)
- # clojurescript (73)
- # conf-proposals (11)
- # cursive (10)
- # datomic (32)
- # devcards (1)
- # dirac (22)
- # editors (5)
- # emacs (3)
- # events (4)
- # funcool (19)
- # hoplon (18)
- # job (1)
- # jobs (3)
- # jobs-rus (16)
- # keechma (25)
- # ldnclj (33)
- # lein-figwheel (10)
- # leiningen (4)
- # luminus (1)
- # off-topic (19)
- # om (255)
- # onyx (51)
- # overtone (1)
- # parinfer (206)
- # perun (5)
- # proton (2)
- # re-frame (3)
- # reagent (2)
- # remote-jobs (13)
- # ring-swagger (7)
- # slack-help (4)
- # yada (7)
@jjttjj: @dm3 @raywillig
the reason why (head (script :src "A") (script :src "B"))
doesn't work is because the corresponding DOM is generated by Hoplon after it has loaded a HTML page with a <head>
elem only containing the main.js
.
When the code in main.js
runs, it inserts the script
DOM elements into the head
.
This triggers async loading of those scripts.
However, if the loaded HTML contains those <script>
tags, then they are executed sequentially!
(though they might be downloaded in parallel)
In the example given, the order of the scripts matter, because they depend on each other.
Earlier scripts define the AmCharts global variable and subsequent scripts are referencing it.
@jjttjj: I also recommend looking into CLJSJS and I might find some time to help you packaging it, though I've only packaged http://github.com/exicon/hoplon-semantic-ui only which is mostly CSS with a relatively simple JS part...
We - at Exicon - are also missing a powerful charting library actually, but have had enough resources to allocate on packaging / building one.
as I see there are a lot more charting/graphing libs since then, so we should probably dive in again....
but i guess none of those libs are really hoplon compatible or even clojurescript compatible because they doesn't accept persistent data structures
@onetom thanks for the tips, that definitely explains a lot. I'm definitely going to create the package soon, just wanted to make sure i understand how to get things working at a "lower level" with hoplon first
for now i have the scripts loading in a series of $.getScript calls, each with a callback to getSript the next one
so the scripts are loading however there is still something wrong with the display everything looks all warped... I think the images that are including in amcharts are not being displayed? are there any similar things to know about relating to images referenced from js libs?
hmmmm it doesn't seem to be the image assets because the amcharts requires an image-path in the constructor and when i change that to gibberish it looks even worse. also doesn't seem to be an issue with the css file either since the items in the chart are styled according to the css file according to the chrome web tools...
not sure if the solution to all this is still just to make a cljsjs package and i'm just being stubborn trying to get it to work without. just seems like it should be at least possible, if ugly, to do without and since this is kinda more of an involved package with lots of js files and non-js assets i'd feel more comfortable after just seeing a basic demo of it working in hoplon first, but if this is dumb feel free to call me out