Skip to content

Commit

Permalink
tested with chroma.js v2.6.0 (that is refactored into ES modules), sw…
Browse files Browse the repository at this point in the history
…apped local chroma.js lib file (v2.4.0 to v2.6.0), updated examples
  • Loading branch information
balladaniel committed Aug 13, 2024
1 parent 06cc703 commit 77c4373
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 81 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Dániel Balla
Copyright (c) 2024 Dániel Balla

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ All features in the examples listed here have binded tooltips (a default Leaflet
- [Leaflet](https://github.com/Leaflet/Leaflet) (tested with v1.9.4)
### External dependencies
- [simple-statistics.js](https://github.com/simple-statistics/simple-statistics) (tested with v7.8.0)
- [chroma.js](https://github.com/gka/chroma.js) (tested with v2.4.0)
- [chroma.js](https://github.com/gka/chroma.js) (tested with v2.6.0)
- [leaflet-hatchclass](https://github.com/samanbey/leaflet-hatchclass) (only if you intend to use hatch pattern fills for polygons)

Include dependencies plus `leaflet-dataclassification.css` and `leaflet-dataclassification.js` in your code. You can also link them through GitHub Pages:
Expand Down
2 changes: 1 addition & 1 deletion examples/combined.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!-- dependencies locally: -->
<script src="../lib/simple-statistics.min.js"></script> <!-- https://github.com/simple-statistics/simple-statistics -->
<script src="../lib/chroma.min.js"></script> <!-- https://github.com/gka/chroma.js -->
<script src="../lib/chroma.min.cjs"></script> <!-- https://github.com/gka/chroma.js -->

<style>
html, body {
Expand Down
5 changes: 3 additions & 2 deletions examples/lines_c.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
<!-- plugin: -->
<script src="../leaflet-dataclassification.js"></script>
<link rel="stylesheet" href="../leaflet-dataclassification.css" />

<!-- dependencies locally: -->
<script src="../lib/simple-statistics.min.js"></script>
<script src="../lib/chroma.min.js"></script>
<script src="../lib/simple-statistics.min.js"></script> <!-- https://github.com/simple-statistics/simple-statistics -->
<script src="../lib/chroma.min.cjs"></script> <!-- https://github.com/gka/chroma.js -->

<style>
html, body {
Expand Down
7 changes: 4 additions & 3 deletions examples/lines_w.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
<!-- plugin: -->
<script src="../leaflet-dataclassification.js"></script>
<link rel="stylesheet" href="../leaflet-dataclassification.css" />
<!-- dependencies: -->
<script src="../lib/simple-statistics.min.js"></script>
<script src="../lib/chroma.min.js"></script>

<!-- dependencies locally: -->
<script src="../lib/simple-statistics.min.js"></script> <!-- https://github.com/simple-statistics/simple-statistics -->
<script src="../lib/chroma.min.cjs"></script> <!-- https://github.com/gka/chroma.js -->

<style>
html, body {
Expand Down
9 changes: 5 additions & 4 deletions examples/points_c.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@

<!-- plugin: -->
<script src="../leaflet-dataclassification.js"></script>
<link rel="stylesheet" href="../leaflet-dataclassification.css" />
<!-- dependencies: -->
<script src="../lib/simple-statistics.min.js"></script>
<script src="../lib/chroma.min.js"></script>
<link rel="stylesheet" href="../leaflet-dataclassification.css" />

<!-- dependencies locally: -->
<script src="../lib/simple-statistics.min.js"></script> <!-- https://github.com/simple-statistics/simple-statistics -->
<script src="../lib/chroma.min.cjs"></script> <!-- https://github.com/gka/chroma.js -->

<style>
html, body {
Expand Down
7 changes: 4 additions & 3 deletions examples/points_s.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
<!-- plugin: -->
<script src="../leaflet-dataclassification.js"></script>
<link rel="stylesheet" href="../leaflet-dataclassification.css" />
<!-- dependencies: -->
<script src="../lib/simple-statistics.min.js"></script>
<script src="../lib/chroma.min.js"></script>

<!-- dependencies locally: -->
<script src="../lib/simple-statistics.min.js"></script> <!-- https://github.com/simple-statistics/simple-statistics -->
<script src="../lib/chroma.min.cjs"></script> <!-- https://github.com/gka/chroma.js -->

<style>
html, body {
Expand Down
7 changes: 4 additions & 3 deletions examples/polygons_c.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
<!-- plugin: -->
<script src="../leaflet-dataclassification.js"></script>
<link rel="stylesheet" href="../leaflet-dataclassification.css" />
<!-- dependencies: -->
<script src="../lib/simple-statistics.min.js"></script>
<script src="../lib/chroma.min.js"></script>

<!-- dependencies locally: -->
<script src="../lib/simple-statistics.min.js"></script> <!-- https://github.com/simple-statistics/simple-statistics -->
<script src="../lib/chroma.min.cjs"></script> <!-- https://github.com/gka/chroma.js -->

<style>
html, body {
Expand Down
4 changes: 2 additions & 2 deletions examples/polygons_c2.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<script src="../leaflet-dataclassification.js"></script>
<link rel="stylesheet" href="../leaflet-dataclassification.css" />

<!-- dependencies: -->
<!-- dependencies locally: -->
<script src="../lib/simple-statistics.min.js"></script> <!-- https://github.com/simple-statistics/simple-statistics -->
<script src="../lib/chroma.min.js"></script> <!-- https://github.com/gka/chroma.js -->
<script src="../lib/chroma.min.cjs"></script> <!-- https://github.com/gka/chroma.js -->

<style>
html, body {
Expand Down
4 changes: 2 additions & 2 deletions examples/polygons_h.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<script src="../leaflet-dataclassification.js"></script>
<link rel="stylesheet" href="../leaflet-dataclassification.css" />

<!-- dependencies: -->
<!-- dependencies locally: -->
<script src="../lib/simple-statistics.min.js"></script> <!-- https://github.com/simple-statistics/simple-statistics -->
<script src="../lib/chroma.min.js"></script> <!-- https://github.com/gka/chroma.js -->
<script src="../lib/chroma.min.cjs"></script> <!-- https://github.com/gka/chroma.js -->
<script src="../lib/leaflet-hatchclass.js"></script> <!-- https://github.com/samanbey/leaflet-hatchclass -->

<style>
Expand Down
2 changes: 1 addition & 1 deletion leaflet-dataclassification.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* project page: https://github.com/balladaniel/leaflet-dataclassification
*
* MIT License
* Copyright (c) 2023 Dániel Balla
* Copyright (c) 2024 Dániel Balla
*/

L.DataClassification = L.GeoJSON.extend({
Expand Down
58 changes: 58 additions & 0 deletions lib/chroma.min.cjs

Large diffs are not rendered by default.

58 changes: 0 additions & 58 deletions lib/chroma.min.js

This file was deleted.

0 comments on commit 77c4373

Please sign in to comment.