Skip to content

Commit

Permalink
better separator character for plugin hash
Browse files Browse the repository at this point in the history
  • Loading branch information
s-tittel committed Sep 8, 2023
1 parent 2b30fee commit 9dcd874
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ulb-darmstadt/shacl-form",
"version": "1.1.6",
"version": "1.1.7",
"description": "SHACL form generator",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
1 change: 0 additions & 1 deletion src/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export class ShaclForm extends HTMLElement {
const errorDisplay = document.createElement('div')
errorDisplay.innerText = String(e)
this.form.replaceChildren(errorDisplay)

}
}, 50)
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export class Plugins {
if (plugin) {
return plugin
}
plugin = this.plugins[`${predicate}:${undefined}`]
plugin = this.plugins[`${predicate}^${undefined}`]
if (plugin) {
return plugin
}
return this.plugins[`${undefined}:${datatype}`]
return this.plugins[`${undefined}^${datatype}`]
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/plugins/mapbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import MapboxDraw from '@mapbox/mapbox-gl-draw'
import 'mapbox-gl/dist/mapbox-gl.css'
import '@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css'

const dialogTemplate = '<style>#shaclMapDialog .closeButton { position: absolute; right: 0; top: 0; z-index: 1; padding: 10px 12px; cursor: pointer; border: 0; background-color: #FFFA; }\
const dialogTemplate = '<style>#shaclMapDialog .closeButton { position: absolute; right: 0; top: 0; z-index: 1; padding: 6px 8px; cursor: pointer; border: 0; background-color: #FFFA; font-size: 24px; }\
#shaclMapDialog .closeButton:hover { background-color: #FFF }\
#shaclMapDialog .hint { position: absolute; right: 60px; top: 3px; z-index: 1; padding: 4px 6px; background-color: #FFFA; border-radius: 4px; }\
</style><dialog id="shaclMapDialog" onclick="event.target==this && this.close()">\
Expand Down Expand Up @@ -45,19 +45,19 @@ export class MapBoxPlugin extends Plugin {
zoom: 5,
center: { lng: 8.657238961696038, lat: 49.87627570549512 }
})
this.map.addControl(new mapboxgl.NavigationControl(), 'top-left')

this.draw = new MapboxDraw({
displayControlsDefault: false,
controls: { point: true, polygon: true },
});
controls: { point: true, polygon: true }
})
this.map.addControl(new mapboxgl.NavigationControl(), 'top-left')
this.map.addControl(this.draw, 'top-left')

this.map.on('idle', () => {
// this fixes wrong size of canvas
this.map.resize()
})
this.map.on('draw.create', () => this.deleteAllButLastDrawing());
this.map.on('draw.create', () => this.deleteAllButLastDrawing())
}

createInstance(template: ShaclPropertyTemplate, value?: Term): HTMLElement {
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"target": "es6",
"moduleResolution": "node",
"strict": true,
"declaration": true
"declaration": true,
"allowSyntheticDefaultImports": true
},
}

0 comments on commit 9dcd874

Please sign in to comment.