Improve compose form performance, upgrade JS dependencies. LightingBox
now allows to cycle through multiple images
This commit is contained in:
parent
3e9d794ea5
commit
2c50687279
14 changed files with 1251 additions and 713 deletions
|
@ -131,19 +131,14 @@ const Modal = React.createClass({
|
|||
return null;
|
||||
}
|
||||
|
||||
const url = media.get(index).get('url');
|
||||
const hasLeft = index > 0;
|
||||
const hasRight = index + 1 < media.size;
|
||||
const url = media.get(index).get('url');
|
||||
|
||||
let leftNav, rightNav;
|
||||
|
||||
leftNav = rightNav = '';
|
||||
|
||||
if (hasLeft) {
|
||||
leftNav = <div style={leftNavStyle} className='modal-container--nav' onClick={this.handlePrevClick}><i className='fa fa-fw fa-chevron-left' /></div>;
|
||||
}
|
||||
|
||||
if (hasRight) {
|
||||
if (media.size > 1) {
|
||||
leftNav = <div style={leftNavStyle} className='modal-container--nav' onClick={this.handlePrevClick}><i className='fa fa-fw fa-chevron-left' /></div>;
|
||||
rightNav = <div style={rightNavStyle} className='modal-container--nav' onClick={this.handleNextClick}><i className='fa fa-fw fa-chevron-right' /></div>;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue