From b5884087088c18cc9d2f7224bdd5633c1003ce40 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Thu, 13 Feb 2025 09:16:57 -0500 Subject: [PATCH] docs: Update cdn references --- examples/blog-lines/main.js | 2 +- src/trackFeature.js | 2 ++ tutorials/common/tutorials.js | 2 +- tutorials/editor3/index.pug | 2 +- website/source/download/index.html | 6 ++++-- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/blog-lines/main.js b/examples/blog-lines/main.js index 12a3b58d77..29527ba051 100644 --- a/examples/blog-lines/main.js +++ b/examples/blog-lines/main.js @@ -2,7 +2,7 @@ var Libraries = { geojs: { - url: 'https://cdnjs.cloudflare.com/ajax/libs/geojs/{version}/geo.min.js', + url: 'https://cdn.jsdelivr.net/npm/geojs@{version}/geo.min.js', defaultVersion: 'current', mainReference: 'geo', versions: { diff --git a/src/trackFeature.js b/src/trackFeature.js index 9b6e181a11..48660940d0 100644 --- a/src/trackFeature.js +++ b/src/trackFeature.js @@ -216,6 +216,8 @@ var trackFeature = function (arg) { highidx = testidx; } } + // todo: if we want non-linear travel between points, we would adjust + // fl and fh here var fh = (time - lowt) / (hight - lowt), fl = 1 - fh; return {posidx0: lowidx, posidx1: highidx, factor0: fl, factor1: fh, angidx0: lowidx, angidx1: highidx}; }); diff --git a/tutorials/common/tutorials.js b/tutorials/common/tutorials.js index 2ffb7362a0..6cc40c7db7 100644 --- a/tutorials/common/tutorials.js +++ b/tutorials/common/tutorials.js @@ -13,7 +13,7 @@ var processBlockInfo = { '\n' + '\n' + /* We could also load from the CDN: - * https://cdnjs.cloudflare.com/ajax/libs/geojs/1.4.2/geo.min.js + * https://cdn.jsdelivr.net/npm/geojs/geo.min.js * or the non-minified versions to make debug easier. */ ' \n' + '\n' + diff --git a/tutorials/editor3/index.pug b/tutorials/editor3/index.pug index 392b6e4aaa..07c4651a7c 100644 --- a/tutorials/editor3/index.pug +++ b/tutorials/editor3/index.pug @@ -17,7 +17,7 @@ block mainTutorial diff --git a/website/source/download/index.html b/website/source/download/index.html index 5c1c07d261..da6400cd28 100644 --- a/website/source/download/index.html +++ b/website/source/download/index.html @@ -10,9 +10,11 @@

Download

Released builds

Each released versions of GeoJS can be found on Github.

Use GeoJS from CDN

-

GeoJS is hosted on cdnjs. To use GeoJS, include the following in your HTML head:

+

GeoJS is hosted on cdnjs. It can also be accessed via cdn.jsdelivr.net and unpkg.com. To use GeoJS, include one of the following lines in your HTML head:

{% codeblock lang:html line_number:false %} - + + + {% endcodeblock %}

This will include minified version of GeoJS and its dependencies on your page. The integrity hash will make sure the integrity of the file.

Install from NPM