Fork me on GitHub
Pepijn de Vos10:03:47

@thheller just came across your shadow-experiments repo wile looking for SharedWorker of all possible queries. Looks like an interesting project. Just wanted to make you aware of my own experimental library in case there is some useful overlap with your database efforts:


Hi ! Has anyone managed to generate Highcharts (Highmaps) maps with lat/lon pinned points? I managed to get some simple maps such as this one to display but the ones with lat/lon pinned points such as this one fail with a n.forEach is not a function which I have the feeling is due to the first of the series not having a data field.


I haven’t worked with highcharts, but n.forEach sounds like it’s expecting n to be a JS array, and it isn’t. Maybe you just need a clj->js on your data somewhere?

👀 1

Yes the "`n` needs to be an array" thing hit me too but the thing is: the JS example I'm trying to replicate ( specifically doesn't have said data as explained by the comment Use the gb-all map with no data as a basemap.


Hmm, "no data" could mean nil or it could mean #js [], maybe?


… interesting … let me try …


No … same n.forEach is not a function.


I've figured it out: bumping highcharts to the latest 10.0.0 makes it. So to sum-up: I'm able to generate a map with lat/lon pinned point with Highmaps. 🙂 Thanks for your help @U06CM8C3V

👍 1
Nikolas Pafitis14:03:48

Why is use-fixtures in CLJS different from CLJ? I can't use dynamic vars and binding using :before and :after in CLJS tests.

Richard Bowen14:03:28

Hey. What's an example of using withStyles in ClojureScript?


@silencioseu can you clarify what you are trying to do?


Is it possible to bring a plain js into the global scope of a cljs project? I'm trying to work with and shadow-cljs.


If I'm understanding what you're asking correctly, yes. In JS, say window.whatever = .... In CLJS, say (aget js/window "whatever").


Why would you want the global scope? Also, don't use aget for accessing fields, use it only to access indices within arrays. In the case above, you should write it as (.-whatever js/window).


A precursory look at the documentation suggests that the expectation is that you include neutralino.js as a part of your HTML - and that by itself will create the Neutralino global object. And then you will be able to access it with just js/Neutralino in CLJS - that's it, there are no extra steps involved.


See, when I try to call js/Neutralino I get the error: Neutralino is not defined


It would seem as if there's no global object to be found.


Also I guess I wasn't being accurate when I used the term global scope.


Did you include neutralino.js in your HTML correctly and before your main JS bundle? Do you get any network errors when opening that HTML?


I figured out what went wrong. It was because neutralino is not based on node, and I was trying to use cljs-node-io so the whole thing broke. Then I was able to get autocompletion and everything on (js/Neutralino).

👍 2