12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import React, {Fragment} from 'react';
- import { View } from 'react-native';
- import { Resolver } from './Types';
- // EventSystem
- export default class Module extends React.Component{
- constructor(props) {
- super(props);
- let {
- ModuleID,
- EventSystem
- } = props;
- let eventName = ModuleID + "HitCheck"
- EventSystem && EventSystem.on(eventName, ({x,y}) => {
- return true;
- });
- this.isTemplate = false
- //console.log("GEN EV: " , eventName, EventSystem);
- this._containerStyle = {
- marginLeft: 24,
- marginRight: 24
- }
- }
-
- componentWillMount() {
- }
- setContainerStyle(style) {
- this._containerStyle = style;
- }
- display() {
- throw new Error("You must extend this base Module and override display method!");
- }
- render() {
- return <View ModuleID={this.props.ModuleID} style={[{overflow:'hidden'}]} MY_WRAPPER_FROM_BASE_MODULE={true}>
- {this.display()}
- </View>
- // throw new Error("You must extend this base Module and override render method!");
- }
- getProps() {
- return Resolver(this.constructor.Inputs, this.props);
- }
- }
|