Browse Source

Up CanvasSpot

canvas-spot
Artur Arseniev 3 years ago
parent
commit
6d127edf24
  1. 26
      src/canvas/model/CanvasSpot.ts

26
src/canvas/model/CanvasSpot.ts

@ -72,23 +72,15 @@ export default class CanvasSpot extends ModuleModel<CanvasModule, CanvasSpotProp
}
get style() {
const { em, component } = this;
const cmpView = this.get('componentView');
const el = cmpView?.el || component?.getEl();
const { width, height, x, y } = this.boxRect;
if (el) {
const { width, height, x, y } = this.boxRect;
return {
width,
height,
top: 0,
left: 0,
position: 'absolute',
translate: `${x}px ${y}px`,
};
}
return {};
return {
width,
height,
top: 0,
left: 0,
position: 'absolute',
translate: `${x}px ${y}px`,
};
}
}

Loading…
Cancel
Save