ScatterUtils.js 1.8 KB

1234567891011121314151617181920212223242526
  1. var _excluded = ["option", "isActive"];
  2. function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
  3. function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
  4. function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
  5. import * as React from 'react';
  6. import { Symbols } from '../shape/Symbols';
  7. import { Shape } from './ActiveShapeUtils';
  8. export function ScatterSymbol(_ref) {
  9. var option = _ref.option,
  10. isActive = _ref.isActive,
  11. props = _objectWithoutProperties(_ref, _excluded);
  12. if (typeof option === 'string') {
  13. return /*#__PURE__*/React.createElement(Shape, _extends({
  14. option: /*#__PURE__*/React.createElement(Symbols, _extends({
  15. type: option
  16. }, props)),
  17. isActive: isActive,
  18. shapeType: "symbols"
  19. }, props));
  20. }
  21. return /*#__PURE__*/React.createElement(Shape, _extends({
  22. option: option,
  23. isActive: isActive,
  24. shapeType: "symbols"
  25. }, props));
  26. }