sticker panel with ability to choose

This commit is contained in:
muerwre 2018-08-24 17:04:48 +07:00
parent 40a11297c0
commit f2c9cc4abc
10 changed files with 140 additions and 64 deletions

View file

@ -7,7 +7,7 @@ import stickers from '$sprites/stickers.svg';
export class Sticker {
constructor({
latlng, deleteSticker, map, lockMapClicks
latlng, deleteSticker, map, lockMapClicks, sticker
}) {
this.angle = 2.2;
this.isDragging = false;
@ -26,7 +26,7 @@ export class Sticker {
this.stickerArrow.className = 'sticker-arrow';
this.stickerDelete.className = 'sticker-delete';
this.stickerImage.innerHTML = this.generateStickerSVG('green-sm');
this.stickerImage.innerHTML = this.generateStickerSVG(sticker);
this.element.appendChild(this.stickerArrow);
this.element.appendChild(this.stickerImage);