Remove optionality of toolslot.pullout_direction

pull/642/head
Rick Carlino 2018-01-24 15:37:52 -06:00
parent 6f1af5553c
commit f70ff09b3d
8 changed files with 13 additions and 7 deletions

View File

@ -86,7 +86,8 @@ export function fakeToolSlot(): TaggedToolSlotPointer {
y: 10,
z: 10,
radius: 10,
meta: {}
meta: {},
pullout_direction: 0
});
}

View File

@ -218,6 +218,7 @@ const tr11: TaggedPoint = {
},
"name": "Slot One.",
"pointer_type": "ToolSlot",
"pullout_direction": 0,
"radius": 25,
"x": 10,
"y": 10,

View File

@ -66,7 +66,7 @@ describe("<ToolSlotPoint/>", () => {
it("doesn't render toolbay slot", () => {
const p = fakeProps();
p.slot.toolSlot.body.pullout_direction = undefined;
p.slot.toolSlot.body.pullout_direction = 0;
const wrapper = shallow(<ToolSlotPoint {...p } />);
expect(wrapper.find("use").length).toEqual(0);
});

View File

@ -27,7 +27,8 @@ describe("<ToolSlotLayer/>", () => {
x: 1,
y: 2,
z: 3,
meta: {}
meta: {},
pullout_direction: 0
};
const toolSlot = fakeResource("Point", ts);
return {

View File

@ -103,7 +103,7 @@ export enum ToolPulloutDirection {
export interface ToolSlotPointer extends BasePoint {
tool_id: number | undefined;
pointer_type: "ToolSlot";
pullout_direction?: ToolPulloutDirection;
pullout_direction: ToolPulloutDirection;
}
export interface GenericPointer extends BasePoint {

View File

@ -34,7 +34,8 @@ const fakeSlot: TaggedToolSlotPointer = {
z: 0,
name: "wow",
pointer_id: SLOT_ID,
meta: {}
meta: {},
pullout_direction: 0
}
};
const fakeIndex = buildResourceIndex().index;

View File

@ -47,7 +47,8 @@ export function fakeResourceIndex(): ResourceIndex {
"x": 100,
"y": 200,
"z": 300,
"tool_id": 1
"tool_id": 1,
"pullout_direction": 0
},
"uuid": "toolslot"
},

View File

@ -36,7 +36,8 @@ export class ToolBayForm extends React.Component<ToolBayFormProps, {}> {
pointer_type: "ToolSlot",
meta: {},
tool_id: undefined,
name: "Tool Slot"
name: "Tool Slot",
pullout_direction: 0
}
};
}