mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05:35 +00:00
Lint fixes
This commit is contained in:
@@ -25,11 +25,11 @@ const SIZE_RANGE = 0.55;
|
|||||||
* @return {Number} Normalized value
|
* @return {Number} Normalized value
|
||||||
*/
|
*/
|
||||||
function normalizePercent(val) {
|
function normalizePercent(val) {
|
||||||
if (val === '' || isNaN(val)) {
|
if (val === '' || isNaN(val)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
val = Math.round(val * 1000) / 1000;
|
val = Math.round(val * 1000) / 1000;
|
||||||
return val >= 100 ? 100 : val;
|
return val >= 100 ? 100 : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,7 +38,7 @@ function normalizePercent(val) {
|
|||||||
* @return {Number} Rounded value
|
* @return {Number} Rounded value
|
||||||
*/
|
*/
|
||||||
function nearestQtrPct(val) {
|
function nearestQtrPct(val) {
|
||||||
return Math.round(val * 4) / 4;
|
return Math.round(val * 4) / 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,7 +46,7 @@ function nearestQtrPct(val) {
|
|||||||
* @param {SyntheticEvent} e Event
|
* @param {SyntheticEvent} e Event
|
||||||
*/
|
*/
|
||||||
function selectAll(e) {
|
function selectAll(e) {
|
||||||
e.target.select();
|
e.target.select();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export default class ModalHelp extends TranslatedComponent {
|
|||||||
|
|
||||||
return <div className='modal' onClick={ (e) => e.stopPropagation() }>
|
return <div className='modal' onClick={ (e) => e.stopPropagation() }>
|
||||||
<h2>{translate(this.props.title || 'Help')}</h2>
|
<h2>{translate(this.props.title || 'Help')}</h2>
|
||||||
<div dangerouslySetInnerHTML={{__html: text}} />
|
<div dangerouslySetInnerHTML={{ __html: text }} />
|
||||||
<button className='r dismiss cap' onClick={this.context.hideModal}>{translate('close')}</button>
|
<button className='r dismiss cap' onClick={this.context.hideModal}>{translate('close')}</button>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -294,12 +294,11 @@ export default class OutfittingPage extends Page {
|
|||||||
case 69: // 'e'
|
case 69: // 'e'
|
||||||
if (e.ctrlKey || e.metaKey) { // CTRL/CMD + e
|
if (e.ctrlKey || e.metaKey) { // CTRL/CMD + e
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
console.log('Export')
|
|
||||||
this._exportBuild();
|
this._exportBuild();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render the Page
|
* Render the Page
|
||||||
|
|||||||
Reference in New Issue
Block a user