Skip to content

Commit

Permalink
interaction between engine and ui
Browse files Browse the repository at this point in the history
  • Loading branch information
eskim committed Apr 14, 2015
1 parent ce87c1d commit 1444da5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions public/polymer_components/rocon-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<link rel="import" href="../components/polymer/polymer.html">
<!-- <link rel="import" href="../components/paper-button/paper-button.html"> -->
<polymer-element name="rocon-button" role="button" attributes="rocon_id">
<polymer-element name="rocon-button" role="button" attributes="rocon_id text">
<template>
<style>
:host {
Expand All @@ -27,7 +27,7 @@
</style>
<!-- <div class="tile" flex center-justified center self-stretch on-tap="{{handleTap}}"> -->
<div id="wrapper" on-tap="{{handleTap}}">
<content align-center></content> ({{rocon_id}})
<div align-center>{{text}}</div>
</div>
<!-- <div class="tile" center on-tap="{{handleTap}}"> -->
<!-- <content></content> -->
Expand Down
4 changes: 2 additions & 2 deletions public/polymer_components/rocon-text.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="rocon-text" attributes="value" >
<polymer-element name="rocon-text" attributes="text" >
<template>
<style>
:host {
Expand All @@ -25,7 +25,7 @@
</style>
<!-- <div class="tile" flex center-justified center self-stretch on-tap="{{handleTap}}"> -->
<div id="wrapper">
<content align-center></content>
<div align-center>{{text}}</div>
</div>
</template>

Expand Down
4 changes: 2 additions & 2 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ module.exports = function(app, db){
return '<div flex layout '+meta.type+'>'+childrenEl+'</div>';

}else if(meta.type == 'button'){
return '<rocon-button flex rocon_id="'+meta.name+'">'+meta.text+'</rocon-button>';
return '<rocon-button flex rocon_id="'+meta.name+'" text="'+meta.text+'"></rocon-button>';
}else if(meta.type == 'text'){
return '<rocon-text flex rocon_id="'+meta.name+'">'+meta.text+'</rocon-button>';
return '<rocon-text flex rocon_id="'+meta.name+'" text="'+meta.text+'"></rocon-button>';
}


Expand Down
2 changes: 1 addition & 1 deletion views/ui.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
superagent
.post('/api/ros/publish')
.send({topic: 'from-rocon-ui', type: 'std_msgs/String', message: {data: JSON.stringify(detail)}})
.send({topic: '/from-rocon-ui', type: 'std_msgs/String', message: {data: JSON.stringify(detail)}})
.end(function(e, res){
console.log(res.text);
Expand Down

0 comments on commit 1444da5

Please sign in to comment.