Commit 5c18003c authored by Jan Pöppel's avatar Jan Pöppel
Browse files

merged

parents 78d9676a a14e274e
......@@ -141,10 +141,11 @@ class ExperimentView extends Component {
Show Path:
<input type="checkbox" defaultChecked={this.state.showPath} checked={this.state.showPath} onChange={this.onChangeShowPath} disabled={renderAggregates}/>
</div> : ""}
<div>
{/* <div>
Show Complete Path:
<input type="checkbox" defaultChecked={this.props.completePath} checked={this.props.completePath} onChange={this.props.onChangeCompletePath} />
</div> : ""}
<div>
{/* {this.props.beliefs ? */}
<div>
Show Visible area:
......
......@@ -231,7 +231,6 @@ class CanvasGridworld extends PureComponent {
var posThick = {};
var visited = {};
var maxPos = 0;
for (var i=0; i< aggregates.length; i++) {
visited= {};
var trajObj = aggregates[i];
......@@ -240,18 +239,14 @@ class CanvasGridworld extends PureComponent {
traj.forEach(function(pos, j) {
var posString = JSON.stringify(pos);
// if (!visited[posString]){
if (!visited[posString]){
if (posThick[posString]) {
posThick[posString] += 1
} else {
posThick[posString] = 1
}
if (posThick[posString] > maxPos) {
maxPos = posThick[posString];
}
// }
// visited[posString] = true;
}
visited[posString] = true;
})
}
......@@ -259,21 +254,21 @@ class CanvasGridworld extends PureComponent {
var trajObj = aggregates[i];
var name = Object.keys(trajObj)[0];
var traj = trajObj[name];
context.strokeStyle = "black"; //this.getColor(i, aggregates.length); //"red";
context.strokeStyle = this.getColor(i, aggregates.length); //"red";
var lastPos;
traj.forEach(function(pos, j) {
//context.lineWidth = posThick[JSON.stringify(pos)]/2;
context.lineWidth = posThick[JSON.stringify(pos)]/2;
context.beginPath();
let centerX = pos[1]*tileSize + tileSize/2;
let centerY = pos[0]*tileSize + tileSize/2;
if (j > 0) {
context.moveTo(lastPos[0], lastPos[1]);
context.lineTo(centerX,centerY);
}
context.stroke();
lastPos = [centerX, centerY];
context.stroke();
})
}
......@@ -304,9 +299,13 @@ class CanvasGridworld extends PureComponent {
this.renderAggregates();
}
if (this.props.pos ) {
if (this.props.pos && !renderAggregates) {
this.renderAgent();
}
if (renderAggregates) {
this.renderAggregates();
}
};
}
......
......@@ -637,9 +637,9 @@ export default class Webblocks extends Component {
options2={participantConditions} selected2={this.conditionName}
onChange2={this.onCondSelection} />
</Element>
{/* <Element key="Action Prediction" id="Action Prediction">
<Element key="Action Prediction" id="Action Prediction">
<ActionPrediction actionPredictions={actionPredictions}/>
</Element> */}
</Element>
<Element key="studyReview" id="studyReview">
{this.state.studyResults ? <StudyReview
width={layout["studyReview"] ? parseInt(layout["studyReview"].w)*colwidth : 600}
......
......@@ -128,7 +128,7 @@ ul {
}
.condition-list {
column-width: 330px;
column-width: 350px;
overflow: auto;
}
......
import './index.css';
import React from 'react';
import ReactDOM from 'react-dom';
import Dashboard from "./components/dashboard";
import Webblocks from "./components/webblocks";
import { Provider } from 'react-redux'
import configureStore from './store'
/*
if (process.env.NODE_ENV !== 'production') {
const {whyDidYouUpdate} = require('why-did-you-update')
whyDidYouUpdate(React)
}
*/
const initialState = {};
function reducer(prevState = initialState, action) {
return prevState;
}
// const store = createStore(reducer)
const store = configureStore({})
console.log("store: ", store.getState())
ReactDOM.render(
<Provider store={store}>
<Dashboard />
{/* <Webblocks/> */}
</Provider>,
document.getElementById('dashboard')
);
import './index.css';
import React from 'react';
import ReactDOM from 'react-dom';
import Dashboard from "./components/dashboard";
import { Provider } from 'react-redux'
import configureStore from './store'
/*
if (process.env.NODE_ENV !== 'production') {
const {whyDidYouUpdate} = require('why-did-you-update')
whyDidYouUpdate(React)
}
*/
const initialState = {};
function reducer(prevState = initialState, action) {
return prevState;
}
// const store = createStore(reducer)
const store = configureStore({})
console.log("store: ", store.getState())
ReactDOM.render(
<Provider store={store}>
<Dashboard />
</Provider>,
document.getElementById('dashboard')
);
Supports Markdown
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