Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mc tutorial videos #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions app/examplesquare.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import d3 from 'd3';
var ExampleStore = require('./stores/examplestore.js');
var WaveformPathMixin = require('./util/waveformpathmixin.js');



var ExampleSquare = React.createClass({
mixins: [
WaveformPathMixin,
Expand Down Expand Up @@ -45,9 +47,11 @@ var ExampleSquare = React.createClass({
this.props.resolution, this.props.maxFrequencyRendered, this.props.limitFrequencies);
},

componentWillMount: function () {
componentWillMount: function () {
this._visPath = "";
this.onExampleChange(ExampleStore.store.getInitialState());
ExampleStore.actions.selectExample("v4");


},

_handleClick : function(e) {
Expand Down
12 changes: 6 additions & 6 deletions app/stores/examplestore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1327,18 +1327,18 @@ var exampleStore = Reflux.createStore({

listenables: [exampleActions],

init() {
this._data = {
selected:"test1",
examples:examples
init() {
this._data = {
selected:"test1",
examples:examples
};
},

getInitialState() {
return this._data;
},

onSelectExample(newName) {
onSelectExample(newName) {
var foundName = "";
for (var ex in this._data.examples) {
if (ex === newName)
Expand All @@ -1355,7 +1355,7 @@ var exampleStore = Reflux.createStore({
}
VTIconStore.actions.setVTIcon(this._data.examples[foundName], name=EXAMPLE_KEY);
PlaybackStore.actions.setTime(0);
LogStore.actions.log("EXAMPLE_SELECT_"+foundName);
LogStore.actions.log("EXAMPLE_SELECT_"+foundName); //this causes a firebase error that we probably have to check for in there
}

this.trigger(this._data);
Expand Down
2 changes: 2 additions & 0 deletions app/stores/scalestore.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import d3 from 'd3';

var VTIconStore = require('./vticonstore.js');

//Testing to see if loading example store default will lead to different console output
var ExampleStore = require('./examplestore.js');

var scaleActions = Reflux.createActions([
'setTimelineRange',
Expand Down
31 changes: 16 additions & 15 deletions app/stores/vticonstore.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ var vticonStore = Reflux.createStore({
init : function() {
this._data = {

main: {
duration: 3000, //ms
main: { //left side editor
duration: 3000, //ms //was 3000

selected: true,

Expand All @@ -71,32 +71,33 @@ var vticonStore = Reflux.createStore({
}
},

example: {
duration: 3000, //ms
example: { //right side editor
duration: 3000, //ms

selected: false,
selected: true,

selectedTimeRange: {
active:false,
time1:0,
time2:0
active:false,
time1:0,
time2:0
},

parameters: {
amplitude: {
valueScale:[0,1], //normalized
valueScale:[0,1],
data : [
{ id: 6, t: 600, value:0.5, selected:false},
{ id: 7, t: 1500, value:1, selected:false},
{ id: 8, t: 3000, value:0, selected:false}]
{ id: 6, t: 600, value:0.5, selected:false},
{ id: 7, t: 1500, value:1, selected:false},
{ id: 8, t: 3000, value:0, selected:false}]
},

frequency: {
valueScale:[50,500], //Hz
valueScale:[50,500], //Hz , was [50,500]
data : [
{ id: 9, t: 0, value:250, selected:false},
{ id: 10, t: 1200, value:50, selected:false},
{ id: 11, t: 1800, value:500, selected:false}]
{ id: 10, t: 1200, value:50, selected:false},
{ id: 11, t: 1800, value:500, selected:false}]

}
}
}
Expand Down
11 changes: 11 additions & 0 deletions app/vteditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,17 @@ var VTEditor = React.createClass({
/**
*Resizing functions
*/

//testing
// componentWillMount: function () {

// window.addEventListener('resize', this.handleResize);
// window.addEventListener('mousemove', this._handleMouseMove);
// window.addEventListener('mouseup', this._handleMouseUp);
// window.addEventListener('keydown', this._handleKeyboard);
// this._updateScales();

// },

componentDidMount: function () {

Expand Down
14 changes: 9 additions & 5 deletions css/mcinstructions.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

.modalDialogInstructions > div {
width: 1000px;
width: auto;
position: relative;
margin: 1% auto;
padding: 5px 20px 40px 20px; /*top left bottom right*/
Expand All @@ -47,12 +47,16 @@

border-top-left-radius: 12px;
border-top-right-radius: 12px;


top: -25px;
right: 20px;
width: 1000px;
height: 50px;
right: 10px;
left: -20px;

width:100%;
/*height: 50px;*/

padding:10px 20px 5px; /*top left bottom right*/
padding:10px 20px 20px; /*top left bottom right*/
font-weight: bold;

}
Expand Down
2 changes: 1 addition & 1 deletion css/mcpolicy.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
color: #ffffff;
line-height: 25px;
position: absolute;
right: -12px;
right: -4px; /*was -12px*/
text-align: center;
top: -10px;
width: 24px;
Expand Down
Binary file modified img/macaron-instruct-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/macaron-load-example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/macaron-make-vibration.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/macaron-playback.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/macaron-save-load-vibration.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.