Fork me on GitHub
#clojurescript
<
2022-03-24
>
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: https://github.com/NyanCAD/hipflask/

Galaux12:03:20

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 https://www.highcharts.com/demo/maps/geojson to display but the ones with lat/lon pinned points such as this one https://www.highcharts.com/demo/maps/mappoint-latlon 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.

manutter5112:03:41

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
Galaux12:03:20

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

manutter5113:03:38

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

Galaux13:03:29

… interesting … let me try …

Galaux13:03:56

No … same n.forEach is not a function.

Galaux15:03:47

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?

dnolen15:03:12

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

West22:03:37

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

jeff.terrell22:03:01

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

p-himik22:03:14

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).

p-himik22:03:01

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.

West22:03:57

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

West22:03:18

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

West22:03:14

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

p-himik22:03:08

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?

West23:03:31

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