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() { get style() {
const { em, component } = this; const { width, height, x, y } = this.boxRect;
const cmpView = this.get('componentView');
const el = cmpView?.el || component?.getEl();
if (el) { return {
const { width, height, x, y } = this.boxRect; width,
height,
return { top: 0,
width, left: 0,
height, position: 'absolute',
top: 0, translate: `${x}px ${y}px`,
left: 0, };
position: 'absolute',
translate: `${x}px ${y}px`,
};
}
return {};
} }
} }

Loading…
Cancel
Save