From 3852fd4806d0d72ffed067384e12960120e83033 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 16 Aug 2023 19:35:47 +0400 Subject: [PATCH] Up CanvasSpot --- src/canvas/model/CanvasSpot.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/canvas/model/CanvasSpot.ts b/src/canvas/model/CanvasSpot.ts index c32e04ec7..2cc4ef08d 100644 --- a/src/canvas/model/CanvasSpot.ts +++ b/src/canvas/model/CanvasSpot.ts @@ -62,16 +62,17 @@ export default class CanvasSpot 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() {