Browse Source

Up CanvasSpot

pull/5321/head
Artur Arseniev 3 years ago
parent
commit
3852fd4806
  1. 9
      src/canvas/model/CanvasSpot.ts

9
src/canvas/model/CanvasSpot.ts

@ -62,16 +62,17 @@ export default class CanvasSpot<T extends CanvasSpotProps = CanvasSpotProps> ext
}
get component() {
return this.get('component');
const cmp = this.get('component');
return cmp || this.get('componentView')?.model;
}
get componentView() {
return this.get('componentView');
const cmpView = this.get('componentView');
return cmpView || this.get('component')?.getView();
}
get el() {
const { component, componentView } = this;
return componentView?.el || component?.getEl();
return this.componentView?.el;
}
get style() {

Loading…
Cancel
Save