Update leaflet

This commit is contained in:
James Lyne 2022-02-06 20:03:50 +00:00
parent 6d27068702
commit 971cd72af5
4 changed files with 8 additions and 15 deletions

8
package-lock.json generated
View File

@ -11,7 +11,7 @@
"dependencies": {
"@kyvg/vue3-notification": "2.3.0",
"@soerenmartius/vue3-clipboard": "^0.1",
"leaflet": "git+https://github.com/JLyne/Leaflet.git#2805e6e6c2a7a2ca66a6dc642b1a199ee6669004",
"leaflet": "git+https://github.com/JLyne/Leaflet.git#f056e232a9f35ea3f15c054043a12c318fcb88b5",
"lodash.debounce": "^4.0.8",
"modern-normalize": "^1.1.0",
"vue": "^3.2.29",
@ -8290,7 +8290,7 @@
},
"node_modules/leaflet": {
"version": "1.7.1-LiveAtlas",
"resolved": "git+ssh://git@github.com/JLyne/Leaflet.git#2805e6e6c2a7a2ca66a6dc642b1a199ee6669004",
"resolved": "git+ssh://git@github.com/JLyne/Leaflet.git#f056e232a9f35ea3f15c054043a12c318fcb88b5",
"license": "BSD-2-Clause"
},
"node_modules/leven": {
@ -18447,8 +18447,8 @@
"dev": true
},
"leaflet": {
"version": "git+ssh://git@github.com/JLyne/Leaflet.git#2805e6e6c2a7a2ca66a6dc642b1a199ee6669004",
"from": "leaflet@git+https://github.com/JLyne/Leaflet.git#2805e6e6c2a7a2ca66a6dc642b1a199ee6669004"
"version": "git+ssh://git@github.com/JLyne/Leaflet.git#f056e232a9f35ea3f15c054043a12c318fcb88b5",
"from": "leaflet@git+https://github.com/JLyne/Leaflet.git#f056e232a9f35ea3f15c054043a12c318fcb88b5"
},
"leven": {
"version": "3.1.0",

View File

@ -17,7 +17,7 @@
"dependencies": {
"@kyvg/vue3-notification": "2.3.0",
"@soerenmartius/vue3-clipboard": "^0.1",
"leaflet": "git+https://github.com/JLyne/Leaflet.git#2805e6e6c2a7a2ca66a6dc642b1a199ee6669004",
"leaflet": "git+https://github.com/JLyne/Leaflet.git#f056e232a9f35ea3f15c054043a12c318fcb88b5",
"lodash.debounce": "^4.0.8",
"modern-normalize": "^1.1.0",
"vue": "^3.2.29",

View File

@ -51,6 +51,8 @@ const defaultOptions: GenericIconOptions = {
export class GenericIcon extends Layer implements Icon<GenericIconOptions> {
declare options: GenericIconOptions;
declare createShadow: (oldIcon?: HTMLElement) => HTMLElement;
private _image?: HTMLImageElement;
private _label?: HTMLSpanElement;
private _container?: HTMLDivElement;
@ -97,11 +99,6 @@ export class GenericIcon extends Layer implements Icon<GenericIconOptions> {
return div;
}
createShadow(oldIcon?: HTMLElement): HTMLElement {
// @ts-ignore - Typings are wrong here, can return null
return null;
}
createLabel() {
if(!this._container || this._labelCreated) {
return;

View File

@ -36,6 +36,7 @@ export interface PlayerIconOptions extends BaseIconOptions {
export class PlayerIcon extends Layer implements Icon<PlayerIconOptions> {
declare options: PlayerIconOptions;
declare createShadow: (oldIcon?: HTMLElement) => HTMLElement;
private readonly _player: LiveAtlasPlayer;
private _container?: HTMLDivElement;
@ -120,11 +121,6 @@ export class PlayerIcon extends Layer implements Icon<PlayerIconOptions> {
return this._container;
}
createShadow(oldIcon?: HTMLElement): HTMLElement {
// @ts-ignore - Typings are wrong here, can return null
return null;
}
updateImage() {
getMinecraftHead(this._player, this.options.imageSize).then(head => {
this._playerImage!.src = head.src;