Fix editing of export-map example on codesandbox

This commit is contained in:
Maximilian Krög
2022-07-30 23:27:21 +02:00
parent 37aaf8ed4b
commit d747216180
2 changed files with 4 additions and 1 deletions

View File

@@ -5,6 +5,9 @@ shortdesc: Example of exporting a map as a PNG image.
docs: >
Example of exporting a map as a PNG image.
tags: "export, png, openstreetmap"
resources:
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css
- https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css
---
<div id="map" class="map"></div>
<a id="export-png" class="btn btn-default"><i class="fa fa-download"></i> Download PNG</a>

View File

@@ -16,7 +16,7 @@ const isJsRegEx = /\.js(\?.*)?$/;
const importRegEx = /\s?import .*? from '([^']+)'/g;
const isTemplateJs =
/\/(jquery(-\d+\.\d+\.\d+)?|(bootstrap(\.bundle)?))(\.min)?\.js(\?.*)?$/;
const isTemplateCss = /\/bootstrap(\.min)?\.css(\?.*)?$/;
const isTemplateCss = /\/(?:bootstrap|font-awesome)(\.min)?\.css(\?.*)?$/;
const exampleDirContents = fs
.readdirSync(path.join(baseDir, '..'))