rt-sim-training-client/src/jmap/shape/factory.js
2019-07-04 18:39:30 +08:00

17 lines
346 B
JavaScript

import deviceType from '../config/deviceType';
import Link from './Link';
/** 图库*/
const mapShape = {};
mapShape[deviceType.Link] = Link;
function shapefactory(type, device, style) {
const shape = mapShape[type];
if (shape instanceof Function) {
return new shape(device, style[type], style.Global);
}
}
export default shapefactory
;