Browse Source

Up

pull/5642/head
Artur Arseniev 3 years ago
parent
commit
b56973cccc
  1. 10
      src/trait_manager/view/TraitsView.ts

10
src/trait_manager/view/TraitsView.ts

@ -33,19 +33,19 @@ export default class TraitsView extends DomainViews {
rendered?: boolean; rendered?: boolean;
itemsView: TraitManager['types']; itemsView: TraitManager['types'];
constructor(o: TraitsViewProps, itemsView: TraitManager['types']) { constructor(props: TraitsViewProps, itemsView: TraitManager['types']) {
super(o); super(props);
this.itemsView = itemsView; this.itemsView = itemsView;
const config = o.config || {}; const config = props.config || {};
this.config = config; this.config = config;
const em = o.editor; const em = props.editor;
this.em = em; this.em = em;
const ppfx = config.pStylePrefix || ''; const ppfx = config.pStylePrefix || '';
this.ppfx = ppfx; this.ppfx = ppfx;
this.pfx = ppfx + config.stylePrefix || ''; this.pfx = ppfx + config.stylePrefix || '';
this.className = `${this.pfx}traits`; this.className = `${this.pfx}traits`;
this.categories = o.categories || ''; this.categories = props.categories || '';
this.traitContClass = `${ppfx}traits-c`; this.traitContClass = `${ppfx}traits-c`;
this.catsClass = `${ppfx}trait-categories`; this.catsClass = `${ppfx}trait-categories`;
this.listenTo(em, 'component:toggled', this.updatedCollection); this.listenTo(em, 'component:toggled', this.updatedCollection);

Loading…
Cancel
Save