Skip to content

Commit

Permalink
[UPD] carte template
Browse files Browse the repository at this point in the history
  • Loading branch information
Viglino committed Feb 5, 2024
1 parent 9d23dd4 commit c3996a0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions .parcelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": ["@parcel/config-default"],
"reporters": ["...", "parcel-reporter-static-files-copy"],
"transformers": {
"*.carte": ["...", "@parcel/transformer-raw"],
"*.txt": ["...", "@parcel/transformer-inline-string"],
"*-page.html": ["...", "@parcel/transformer-inline-string"],
"*-dialog.html": ["...", "@parcel/transformer-inline-string"],
Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/map/carte.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import '../page/carte.css'

// Carte
const carte = new Carte({
url: './data/default.carte',
key: config.gppKey,
target: charte.getAppElement()
});
Expand Down Expand Up @@ -52,6 +51,9 @@ carte.on('error', () => {
dlgload.showAlert('Une erreur est survenue !<br/>Impossible de lire la carte...')
})

import template from './template.carte'
carte.read(template)

// Show / hide image on space key
document.addEventListener('keydown', (e) => {
if (e.key === ' ') {
Expand Down
File renamed without changes.

0 comments on commit c3996a0

Please sign in to comment.