Heart reaction: dynamic postion
This commit is contained in:
parent
134b1f8cff
commit
f1c12663c8
2 changed files with 24 additions and 10 deletions
|
|
@ -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", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue