Code formatting
This commit is contained in:
parent
a6ac76757b
commit
6ddbb1f765
1 changed files with 7 additions and 7 deletions
|
|
@ -137,13 +137,13 @@ export default {
|
||||||
// may be larger than the picture. So, we must determine whether the
|
// may be larger than the picture. So, we must determine whether the
|
||||||
// width or height is setting the scaling factor, and use a uniform scale
|
// width or height is setting the scaling factor, and use a uniform scale
|
||||||
// factor.
|
// factor.
|
||||||
let scale = Math.max(event.target.naturalWidth/event.target.offsetWidth,
|
let scale = Math.max(
|
||||||
event.target.naturalHeight/event.target.offsetHeight);
|
event.target.naturalWidth / event.target.offsetWidth,
|
||||||
|
event.target.naturalHeight / event.target.offsetHeight
|
||||||
|
);
|
||||||
|
|
||||||
let xRelative =
|
let xRelative = (0.5 * event.target.offsetWidth - xCoordinate) * scale;
|
||||||
(0.5 * event.target.offsetWidth - xCoordinate) * scale;
|
let yRelative = (0.5 * event.target.offsetHeight - yCoordinate) * scale;
|
||||||
let yRelative =
|
|
||||||
(0.5 * event.target.offsetHeight - yCoordinate) * scale;
|
|
||||||
|
|
||||||
// Emit a signal to move, acted on by panelNavigate.vue
|
// Emit a signal to move, acted on by panelNavigate.vue
|
||||||
this.$root.$emit(
|
this.$root.$emit(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue