Skip to content

Commit

Permalink
update dir
Browse files Browse the repository at this point in the history
  • Loading branch information
fuermosi777 committed Nov 7, 2016
1 parent 0ef02f8 commit 2cc600e
Show file tree
Hide file tree
Showing 6 changed files with 23,411 additions and 284 deletions.
4 changes: 2 additions & 2 deletions demo/prod/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
/******/ }

/******/ var hotApplyOnUpdate = true;
/******/ var hotCurrentHash = "1c9ab50d337f803851c8"; // eslint-disable-line no-unused-vars
/******/ var hotCurrentHash = "ab04f746faca10f065ae"; // eslint-disable-line no-unused-vars
/******/ var hotCurrentModuleData = {};
/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars

Expand Down Expand Up @@ -568,7 +568,7 @@
/******/ __webpack_require__.c = installedModules;

/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "http://localhost:8080/";
/******/ __webpack_require__.p = "";

/******/ // __webpack_hash__
/******/ __webpack_require__.h = function() { return hotCurrentHash; };
Expand Down
10 changes: 9 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ module.exports = React.createClass({
fixed: false,
autohide: false,
timeout: 2000,
tracksize: '10px'
tracksize: '10px',
start: 'top left'
};
},

Expand Down Expand Up @@ -125,6 +126,13 @@ module.exports = React.createClass({
this.collectInfo();
this.updateTrackVisibilities();
this.handlerContainerScroll();

if (this.props.start.includes('bottom')) {
this.el.scrollTop = this.el.scrollHeight;
}
if (this.props.start.includes('right')) {
this.el.scrollLeft = this.el.scrollWidth;
}
},
componentWillUnmount: function componentWillUnmount() {
document.removeEventListener('mousemove', this.handleHandlerMouseMove);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "dist/index.js",
"scripts": {
"demo-dev": "webpack-dev-server --config webpack.config.dev.js --hot --inline --colors --progress",
"demo-build": "webpack --config webpack.config.prod.js --hot --inline --colors --progress",
"dist": "babel src/index.jsx -u -o site/index.js --stage 1 --presets react"
"demo-build": "webpack --config webpack.config.prod.js --hot --inline --colors --progress",
"dist": "babel src/index.jsx -u -o dist/index.js --stage 1 --presets react"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<body>
<div id="app"></div>
<script src="http://localhost:8080/demo.js"></script>
<script src="index.js"></script>
</body>

</html>
Loading

0 comments on commit 2cc600e

Please sign in to comment.