diff --git a/app/examplesquare.jsx b/app/examplesquare.jsx index 320e67e..9dc4feb 100644 --- a/app/examplesquare.jsx +++ b/app/examplesquare.jsx @@ -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, @@ -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) { diff --git a/app/stores/examplestore.js b/app/stores/examplestore.js index 7f2b2a7..719b563 100644 --- a/app/stores/examplestore.js +++ b/app/stores/examplestore.js @@ -1327,10 +1327,10 @@ var exampleStore = Reflux.createStore({ listenables: [exampleActions], - init() { - this._data = { - selected:"test1", - examples:examples + init() { + this._data = { + selected:"test1", + examples:examples }; }, @@ -1338,7 +1338,7 @@ var exampleStore = Reflux.createStore({ return this._data; }, - onSelectExample(newName) { + onSelectExample(newName) { var foundName = ""; for (var ex in this._data.examples) { if (ex === newName) @@ -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); diff --git a/app/stores/scalestore.js b/app/stores/scalestore.js index 8ca4a63..6a2e7e7 100644 --- a/app/stores/scalestore.js +++ b/app/stores/scalestore.js @@ -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', diff --git a/app/stores/vticonstore.js b/app/stores/vticonstore.js index 2be2e65..d1af2fb 100644 --- a/app/stores/vticonstore.js +++ b/app/stores/vticonstore.js @@ -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, @@ -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}] + } } } diff --git a/app/vteditor.jsx b/app/vteditor.jsx index e49e341..2fd3510 100644 --- a/app/vteditor.jsx +++ b/app/vteditor.jsx @@ -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 () { diff --git a/css/mcinstructions.css b/css/mcinstructions.css index ee38c07..97ca092 100644 --- a/css/mcinstructions.css +++ b/css/mcinstructions.css @@ -24,7 +24,7 @@ } .modalDialogInstructions > div { - width: 1000px; + width: auto; position: relative; margin: 1% auto; padding: 5px 20px 40px 20px; /*top left bottom right*/ @@ -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; } diff --git a/css/mcpolicy.css b/css/mcpolicy.css index 551b013..17395a2 100644 --- a/css/mcpolicy.css +++ b/css/mcpolicy.css @@ -35,7 +35,7 @@ color: #ffffff; line-height: 25px; position: absolute; - right: -12px; + right: -4px; /*was -12px*/ text-align: center; top: -10px; width: 24px; diff --git a/img/macaron-instruct-1.png b/img/macaron-instruct-1.png index 2ee2b15..9b79425 100644 Binary files a/img/macaron-instruct-1.png and b/img/macaron-instruct-1.png differ diff --git a/img/macaron-load-example.gif b/img/macaron-load-example.gif index 98cf214..40cf723 100644 Binary files a/img/macaron-load-example.gif and b/img/macaron-load-example.gif differ diff --git a/img/macaron-make-vibration.gif b/img/macaron-make-vibration.gif index 9ca7077..f121649 100644 Binary files a/img/macaron-make-vibration.gif and b/img/macaron-make-vibration.gif differ diff --git a/img/macaron-playback.gif b/img/macaron-playback.gif index 1938733..595664f 100644 Binary files a/img/macaron-playback.gif and b/img/macaron-playback.gif differ diff --git a/img/macaron-save-load-vibration.gif b/img/macaron-save-load-vibration.gif index 2a4fe5c..75ee15c 100644 Binary files a/img/macaron-save-load-vibration.gif and b/img/macaron-save-load-vibration.gif differ