Use new click-to-move API route

This modifies the client to use the new move_in_image_coordinates API route
provided by the camera_stage_mapping plugin.

NB I've not yet deleted vestigial code relating to the "FoV" property.
This commit is contained in:
Richard Bowman 2020-03-25 05:50:42 +00:00
parent 2ba9c9493b
commit 0e88ad130b
2 changed files with 57 additions and 7 deletions

View file

@ -115,16 +115,13 @@ export default {
let xRelative =
(0.5 * event.target.offsetWidth - xCoordinate) /
event.target.offsetWidth;
event.target.offsetWidth * event.target.naturalWidth;
let yRelative =
(0.5 * event.target.offsetHeight - yCoordinate) /
event.target.offsetHeight;
let xSteps = xRelative * this.fov[0];
let ySteps = yRelative * this.fov[1];
event.target.offsetHeight * event.target.naturalHeight;
// Emit a signal to move, acted on by panelNavigate.vue
this.$root.$emit("globalMoveEvent", xSteps, ySteps, 0, false);
this.$root.$emit("globalMoveInImageCoordinatesEvent", -xRelative, -yRelative);
},
flashStream: function() {