From a23a29fdfd8f619c96b1d0579b4334372d3ffa3c Mon Sep 17 00:00:00 2001 From: Eric Westphal Date: Sat, 25 Mar 2017 22:55:19 -0400 Subject: [PATCH] Improved formatting of calibration warning message. --- web/css/ahrs.css | 2 +- web/plates/js/ahrs.js | 2 +- web/plates/js/gps.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/css/ahrs.css b/web/css/ahrs.css index 133ed69e..c3c2a271 100644 --- a/web/css/ahrs.css +++ b/web/css/ahrs.css @@ -154,7 +154,7 @@ .error .errText { font-size: 16px; font-family: sans-serif; - text-anchor: middle; + text-anchor: central; alignment-baseline: middle; stroke-width: 0px; fill: red; diff --git a/web/plates/js/ahrs.js b/web/plates/js/ahrs.js index 114370a2..43005433 100644 --- a/web/plates/js/ahrs.js +++ b/web/plates/js/ahrs.js @@ -130,7 +130,7 @@ ahrsRenderer.prototype = { }, turn_off: function(message) { - this.errText.text(message); + this.errText.text(message).center(0, 0); var tb = this.errText.bbox(); this.errTextBg.attr({'x': tb.x, 'y': tb.y, 'width': tb.w, 'height': tb.h}); this.ai.hide(); diff --git a/web/plates/js/gps.js b/web/plates/js/gps.js index f51e37e8..8aec1d4f 100644 --- a/web/plates/js/gps.js +++ b/web/plates/js/gps.js @@ -265,7 +265,7 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) { $scope.IsCaging = function() { var caging = statusCal.innerText === "Caging"; if (caging) { - ahrs.turn_off("Sensor is calibrating.\nFly level and do not move sensor."); + ahrs.turn_off("Calibrating. Fly level and do not move sensor."); } else { ahrs.turn_on(); }