Skip to content
Snippets Groups Projects
Commit b700a054 authored by chris's avatar chris
Browse files

fix-position

parent 26cbc550
No related branches found
No related tags found
1 merge request!364Feedback fill the gap
...@@ -6,7 +6,6 @@ import { WaxContext } from 'wax-prosemirror-core'; ...@@ -6,7 +6,6 @@ import { WaxContext } from 'wax-prosemirror-core';
import { DocumentHelpers } from 'wax-prosemirror-utilities'; import { DocumentHelpers } from 'wax-prosemirror-utilities';
const Wrapper = styled.div` const Wrapper = styled.div`
background: #fff;
background: #fff; background: #fff;
border-radius: 1.03093% / 8%; border-radius: 1.03093% / 8%;
box-shadow: rgba(9, 30, 66, 0.25) 0px 4px 8px 0px, box-shadow: rgba(9, 30, 66, 0.25) 0px 4px 8px 0px,
......
...@@ -33,8 +33,8 @@ export default options => { ...@@ -33,8 +33,8 @@ export default options => {
const WaxSurface = focusedView.dom.getBoundingClientRect(); const WaxSurface = focusedView.dom.getBoundingClientRect();
const start = focusedView.coordsAtPos(from); const start = focusedView.coordsAtPos(from);
const end = focusedView.coordsAtPos(to); const end = focusedView.coordsAtPos(to);
const { left } = end; const left = end.left - WaxSurface.left + 5;
const top = end.top + 20; const top = end.top - WaxSurface.top + 20;
return { return {
top, top,
left, left,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment