Commit ab642a37 authored by Matthias Möller's avatar Matthias Möller

first eventbased tiggers

parent e31b0cff
......@@ -4,7 +4,7 @@ import layout from '../templates/components/explorviz-frontend-plugin-bci';
export default Ember.Component.extend({
layout:layout,
emotivWebsocket: Ember.inject.service("emotiv-websocket"),
tagName: "a",
tagName: "a",
classNameBindings: ["status"],
status : "",
click: function(){
......
......@@ -2,26 +2,6 @@ export function initialize(applicationInstance) {
console.log("start");
let addonService = applicationInstance.lookup("service:configuration");
addonService.get("addonNavbarRight").push("explorviz-frontend-plugin-bci");
/*let addon = {
"domID" : "emotivSignal",
"className" : "glyphicon glyphicon-signal",
"actionName" : "connectBCI"
};
addonService.get("navbarLabels").push(addon);
//Fügt eine neue Action in eine Komponente hinzu
let component = applicationInstance.lookup("component:addon-button");
let connectBCI =
function(domID){
let button = document.getElementById(domID);
let isConnected = (button.dataset.type) ? button.dataset.type : "diconnected";
if(isConnected === "connected"){
}else{
button.dataset.type = "connecting";
console.log(this);
this.get("emotivWebsocket").start();
}
};
component.actions["connectBCI"] = connectBCI;*/
}
......
......@@ -26,11 +26,21 @@ export default Ember.Service.extend({
myMessageHandler: function(event){
let data = event.data;
let canvas = $("threeCanvas");
console.log(canvas);
console.log(data);
},
myCloseHandler: function(event){
Ember.run.later(this, function(){this.set("status", "disconnected")}, 1000);
},
triggerZoom(){
let canvas = $("threeCanvas");
console.log(canvas);
if(Ember.isPresent(canvas)){
Ember.sendEvent(canvas, "mousewheel");
}
}
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment