mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 15:15:34 +00:00
@@ -34,7 +34,7 @@ export default class SlotSection extends TranslatedComponent {
|
|||||||
this.sectionId = sectionId;
|
this.sectionId = sectionId;
|
||||||
this.sectionName = sectionName;
|
this.sectionName = sectionName;
|
||||||
this.ssHeadRef = null;
|
this.ssHeadRef = null;
|
||||||
|
|
||||||
this.sectionRefArr = this.props.sectionMenuRefs[this.sectionId] = [];
|
this.sectionRefArr = this.props.sectionMenuRefs[this.sectionId] = [];
|
||||||
this.sectionRefArr['selectedRef'] = null;
|
this.sectionRefArr['selectedRef'] = null;
|
||||||
this._getSlots = this._getSlots.bind(this);
|
this._getSlots = this._getSlots.bind(this);
|
||||||
@@ -55,11 +55,11 @@ export default class SlotSection extends TranslatedComponent {
|
|||||||
// _contextMenu()
|
// _contextMenu()
|
||||||
// componentDidUpdate(prevProps)
|
// componentDidUpdate(prevProps)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: May either need to send the function to be triggered when Enter key is pressed, or else
|
* TODO: May either need to send the function to be triggered when Enter key is pressed, or else
|
||||||
* may need a separate keyDown handler for each subclass (StandardSlotSection, HardpointSlotSection, etc.)
|
* may need a separate keyDown handler for each subclass (StandardSlotSection, HardpointSlotSection, etc.)
|
||||||
* ex: _keyDown(_keyDownfn, event)
|
* ex: _keyDown(_keyDownfn, event)
|
||||||
*
|
*
|
||||||
* @param {SyntheticEvent} event KeyDown event
|
* @param {SyntheticEvent} event KeyDown event
|
||||||
*/
|
*/
|
||||||
_keyDown(event) {
|
_keyDown(event) {
|
||||||
@@ -85,14 +85,14 @@ export default class SlotSection extends TranslatedComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set focus on appropriate Slot Section Menu element
|
* Set focus on appropriate Slot Section Menu element
|
||||||
* @param {Object} focusPrevProps prevProps for componentDidUpdate() from ...SlotSection.jsx
|
* @param {Object} focusPrevProps prevProps for componentDidUpdate() from ...SlotSection.jsx
|
||||||
* @param {String} firstRef id of the first ref in ...SlotSection.jsx
|
* @param {String} firstRef id of the first ref in ...SlotSection.jsx
|
||||||
* @param {String} lastRef id of the last ref in ...SlotSection.jsx
|
* @param {String} lastRef id of the last ref in ...SlotSection.jsx
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
_handleSectionFocus(focusPrevProps, firstRef, lastRef) {
|
_handleSectionFocus(focusPrevProps, firstRef, lastRef) {
|
||||||
if (this.selectedRefId !== null && this.sectionRefArr[this.selectedRefId]) {
|
if (this.selectedRefId !== null && this.sectionRefArr[this.selectedRefId]) {
|
||||||
@@ -228,6 +228,18 @@ export default class SlotSection extends TranslatedComponent {
|
|||||||
targetSlot.priority = targetPriority;
|
targetSlot.priority = targetPriority;
|
||||||
}
|
}
|
||||||
this.props.onChange();
|
this.props.onChange();
|
||||||
|
this.props.ship
|
||||||
|
.updatePowerGenerated()
|
||||||
|
.updatePowerUsed()
|
||||||
|
.recalculateMass()
|
||||||
|
.updateJumpStats()
|
||||||
|
.recalculateShield()
|
||||||
|
.recalculateShieldCells()
|
||||||
|
.recalculateArmour()
|
||||||
|
.recalculateDps()
|
||||||
|
.recalculateEps()
|
||||||
|
.recalculateHps()
|
||||||
|
.updateMovement();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user