setting.js 544 B

123456789101112131415161718192021
  1. import { inherit } from './object';
  2. /* eslint-disable import/prefer-default-export */
  3. /**
  4. * Factory for columns constructors.
  5. *
  6. * @param {Object} GridSettings
  7. * @param {Array} conflictList
  8. * @return {Object} ColumnSettings
  9. */
  10. export function columnFactory(GridSettings, conflictList) {
  11. function ColumnSettings() {};
  12. inherit(ColumnSettings, GridSettings);
  13. // Clear conflict settings
  14. for (var i = 0, len = conflictList.length; i < len; i++) {
  15. ColumnSettings.prototype[conflictList[i]] = void 0;
  16. }
  17. return ColumnSettings;
  18. }