Heart reaction: dynamic postion

This commit is contained in:
10G Meow 2024-06-08 13:42:57 +03:00
parent 134b1f8cff
commit f1c12663c8
2 changed files with 24 additions and 10 deletions

View file

@ -333,8 +333,10 @@ export default {
this.mcCustom.add(new Hammer.Tap({ event: 'doubletap', taps: 2 }));
this.mcCustom.on("doubletap", () => {
this.$emit("addQuickHeartReaction");
this.mcCustom.on("doubletap", (evt) => {
var { top, left } = evt.target.getBoundingClientRect();
var position = { top: `${top}px`, left: `${left}px`};
this.$emit("addQuickHeartReaction", { position });
});
this.mc.on("press", () => {