Fix editing of export-map example on codesandbox
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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, '..'))
|
||||
|
||||
Reference in New Issue
Block a user