diff --git a/packages/core/src/commands/view/ComponentDrag.ts b/packages/core/src/commands/view/ComponentDrag.ts index f5294e764..089d147ff 100644 --- a/packages/core/src/commands/view/ComponentDrag.ts +++ b/packages/core/src/commands/view/ComponentDrag.ts @@ -31,6 +31,16 @@ type Opts = { onStart?: (data: any) => Editor; onDrag?: (data: any) => Editor; onEnd?: (ev: Event, opt: any, data: any) => void; + styles?: { + guides?: { + active?: { color?: string }; + inactive?: { color?: string }; + }; + guidesContainer?: { + line?: HTMLElement['style']; + content?: HTMLElement['style']; + }; + }; }; const evName = 'dmode'; @@ -63,7 +73,22 @@ export default { ...dragger, }; this.setupGuides(); - this.opts = opts; + this.opts = { + ...opts, + // debug: true + styles: { + guides: { + active: { color: 'green' }, + inactive: { color: 'red' }, + }, + guidesContainer: { + line: { 'background-color': 'blue' }, + content: { color: 'blue' }, + }, + ...opts.styles, + }, + }; + // this.opts = opts; this.editor = editor; this.em = editor.getModel(); this.target = target; @@ -116,8 +141,11 @@ export default { const pfx = editor.getConfig().stylePrefix; const elInfoX = document.createElement('div'); const elInfoY = document.createElement('div'); - const guideContent = `