Node not shown in palette

All the map loading for a start... Not sure why you need a map for cron. Must severely add bloat ?

That's not in NPM yet Dave. And yeah, the map part is a CDN (for obvious reasons) but I'm not sure it could be called bloat (a button and dialog to ease geo coordinates setting) - more of an assist feature that works if you have internet. I do plan on having it show the user a message instead if no internet as fall back before publishing to NPM

@TotallyInformation, if you get a moment, I'd appreciate you pointing out what you spotted please. Ta.

Ok - maybe not severely - but an extra few hundred kB just for the cartodb libraries and then plus any map tiles needed, just to set a timezone you could pick off a list without any connection to internet :slight_smile:

That was my first thought but it's fairly substantial the difference in sun up & sun down time from the east most part of a time zone to the west most point. So for the sake a few hundred KB, I went for accuracy based on lon lat coods.

Perhaps there is a halfway house solution?

1 Like

Hi Steve, I found several let statements, I remember that.

Honestly, the best thing to do is to use eslint with a configuration than highlights anything ES6 related. You can add a simple setting that sets the ES version you want to target. If you want maximum browser support, I think that ES5 is the limit right now. I limit the html file to ES5 but allow ES6 in the .js file so that I can make best use of JS features from node.js v8.6+.

In regard to the mapping stuff. Any chance of that being optional? I'm fairly certain I won't ever use it - especially as I know the Lat/Long coordinates of my house anyway. I'd like to make cron+ the key timing function of my new setup but I'm concerned about having unnecessary code. I'm even more concerned about it being CDN based when I really don't need to use it except maybe once.

well carto then pulls in leaflet and a load of other dependencies so the basic few hundred k is probably MBs. You could always use the built in browser geolocation api - at least the user would get a popup asking if they want to allow access to location and can say no :slight_smile:

1 Like

Thanks for feedback. Afaik, let is fine in IE (apart from some scoping issues)

Hmmmmm. Will have to have a dig.

I first looked at this but dismissed it for some reason.

Perhaps I could (instead of the Cartro lib) have the location button show a dialog where the user can request location from browser and offer advice on getting other location coords from external resources?

@TotallyInformation, @dceejay does that sound like a reasonable compromise?

In Internet Explorer, let within a for loop initializer does not create a separate variable for each loop iteration as defined by ES2015. Instead, it behaves as though the loop were wrapped in a scoping block with the let immediately before the loop.

IE11 only. If anyone needs to support <IE11 then it won't work.


Sod that.

It's hard enough having to cater for the 2.2% still using that atrocity & IE10 is :skull: as of last month anyhoo.

Well true, but as we now have quite a few commercial uses of Node-RED, we cannot rule out that some organisations may still have users stuck in the past.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.