This commit is contained in:
xps2 2018-09-02 01:09:27 +09:00 committed by Aya Morisawa
parent 01beb705a2
commit f24869625e

View File

@ -48,7 +48,7 @@ export default Vue.extend({
const mouseY = e.clientY - rect.top; const mouseY = e.clientY - rect.top;
const xp = mouseX / this.$el.offsetWidth * 100; const xp = mouseX / this.$el.offsetWidth * 100;
const yp = mouseY / this.$el.offsetHeight * 100; const yp = mouseY / this.$el.offsetHeight * 100;
this.$el.style.backgroundPosition = `${xp}% ${yp}%'; this.$el.style.backgroundPosition = `${xp}% ${yp}%`;
this.$el.style.backgroundImage = `url("${this.image.url}")`; this.$el.style.backgroundImage = `url("${this.image.url}")`;
}, },