first import attempts

This commit is contained in:
muerwre 2018-08-29 12:05:09 +07:00
parent 8da254ff9b
commit f7e8da1f1f
9 changed files with 57 additions and 6 deletions

View file

@ -7,9 +7,9 @@ import stickers from '$sprites/stickers.svg';
export class Sticker {
constructor({
latlng, deleteSticker, map, lockMapClicks, sticker
latlng, deleteSticker, map, lockMapClicks, sticker, angle = 2.2
}) {
this.angle = 2.2;
this.angle = angle;
this.isDragging = false;
this.map = map;
@ -39,7 +39,7 @@ export class Sticker {
this.sticker = marker(latlng, { icon: mark });
this.setAngle(this.angle);
this.setAngle(angle);
this.stickerImage.addEventListener('mousedown', this.onDragStart);
this.stickerImage.addEventListener('mouseup', this.onDragStop);