Skip to content

Commit

Permalink
mesh-selection
Browse files Browse the repository at this point in the history
  • Loading branch information
firepick1 committed Feb 19, 2016
1 parent 3dc2809 commit 1ae0b0c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions www/css/firenodejs.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ caption {
margin:0;
padding: 0.1em;
}
.fn-data-selected {
border: 1pt solid #88f;
},
.fn-alert {
color: #a00;
}
Expand Down
8 changes: 6 additions & 2 deletions www/js/mesh-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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];
}
}
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions www/partials/panel-scan.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ <h3 class="panel-title">
<div class="row">
<div>&nbsp;<input type="checkbox" ng-model="flags.meshData"> Show scanned mesh data</div>
<table class="table table-condensed table-hover" ng-if="flags.meshData">
<tr>
<th class="fn-mesh-data" title="vertex coordinate">x</th>
<tr >
<th class="fn-mesh-data " title="vertex coordinate">x</th>
<th class="fn-mesh-data" title="vertex coordinate">y</th>
<th class="fn-mesh-data" title="vertex coordinate">z</th>
<th class="fn-mesh-data" ng-repeat="prop in mesh.propNames"
title="{{mesh.propInfo(prop).name}}: {{mesh.propInfo(prop).title}}"
ng-if="mesh.model.client.props[prop]">{{prop}}</th>
</tr>
<tr ng-repeat="d in mesh.model.config.data">
<tr ng-repeat="d in mesh.model.config.data" class="{{mesh.dataClass(d)}}">
<td class="fn-mesh-data" title="vertex coordinate">{{d.x}}</td>
<td class="fn-mesh-data" title="vertex coordinate">{{d.y}}</td>
<td class="fn-mesh-data" title="vertex coordinate">{{d.z}}</td>
Expand Down

0 comments on commit 1ae0b0c

Please sign in to comment.