From 1ae0b0ca49d357ad826813cb2c188c0e32c444f2 Mon Sep 17 00:00:00 2001 From: "firepick1 (localhost)" Date: Fri, 19 Feb 2016 14:05:40 -0800 Subject: [PATCH] mesh-selection --- www/css/firenodejs.css | 3 +++ www/js/mesh-service.js | 8 ++++++-- www/partials/panel-scan.html | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/www/css/firenodejs.css b/www/css/firenodejs.css index ee616275..0233f66f 100644 --- a/www/css/firenodejs.css +++ b/www/css/firenodejs.css @@ -15,6 +15,9 @@ caption { margin:0; padding: 0.1em; } +.fn-data-selected { + border: 1pt solid #88f; +}, .fn-alert { color: #a00; } diff --git a/www/js/mesh-service.js b/www/js/mesh-service.js index 53c45dd8..b6378e3f 100644 --- a/www/js/mesh-service.js +++ b/www/js/mesh-service.js @@ -66,6 +66,11 @@ services.factory('mesh-service', ['$http', 'AlertService', 'firestep-service', ' propInfo: function(id) { return propInfo[id]; }, + dataClass: function(data) { + var v = data && service.mesh.vertexAtXYZ(data); + return v && service.selection.length && v === service.selection[0] ? + "fn-data-selected" : ""; + }, afterUpdate: function(diff) { if (!diff) { return; @@ -90,7 +95,6 @@ services.factory('mesh-service', ['$http', 'AlertService', 'firestep-service', ' for (var j=service.propNames.length; j-- > 0;) { var prop = service.propNames[j]; if (client.props[prop] && data[prop] != null) { - console.log("data prop:", prop, " value:", data[prop]); v[prop] = data[prop]; } } @@ -117,7 +121,7 @@ services.factory('mesh-service', ['$http', 'AlertService', 'firestep-service', ' client && (postData.props = client.props); $http.post(url, postData).success(function(response, status, headers, config) { console.log("mesh-service.scanVertex(" + camName + ") ", response); - alerts.info(JSON.stringify(response)); + //alerts.info(JSON.stringify(response)); alerts.taskEnd(); updateService.setPollBase(true); service.scan.active = false; diff --git a/www/partials/panel-scan.html b/www/partials/panel-scan.html index c10e129e..c5517a3a 100644 --- a/www/partials/panel-scan.html +++ b/www/partials/panel-scan.html @@ -88,15 +88,15 @@

  Show scanned mesh data
- - + + - +
x
x y z {{prop}}
{{d.x}} {{d.y}} {{d.z}}