chore: move setter to setters

This commit is contained in:
kangwei 2020-03-30 17:41:31 +08:00
parent bced181e98
commit e2004a0c79
23 changed files with 11 additions and 4 deletions

View File

@ -4,20 +4,25 @@
left: 0; left: 0;
z-index: 12; z-index: 12;
pointer-events: none !important; pointer-events: none !important;
background-color: var(--color-brand-light); background-color: white;
height: 3px; height: 5px;
border: 2px solid var(--color-brand-light);
border-radius: 2px;
&.cover { &.cover {
top: 0; top: 0;
height: auto; height: auto;
width: auto; width: auto;
background-color: var(--color-brand-light);
border: none;
opacity: 0.3; opacity: 0.3;
border-radius: 0;
} }
&.vertical { &.vertical {
top: 0; top: 0;
left: -1.5px; left: -1.5px;
width: 3px; width: 5px;
height: auto; height: auto;
} }
&.invalid { &.invalid {

View File

@ -786,6 +786,8 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
const inline = el ? isChildInline(el) : false; const inline = el ? isChildInline(el) : false;
const row = el ? isRowContainer(el.parentElement!) : false; const row = el ? isRowContainer(el.parentElement!) : false;
const vertical = inline || row; const vertical = inline || row;
console.info('mm', inline, vertical, row, el);
// TODO: fix type // TODO: fix type
const near: any = { const near: any = {
node: nearNode, node: nearNode,

View File

@ -86,7 +86,7 @@ export function isChildInline(child: Element | Text, win?: Window) {
return true; return true;
} }
const style = (win || getWindow(child)).getComputedStyle(child); const style = (win || getWindow(child)).getComputedStyle(child);
return /^inline/.test(style.getPropertyValue('display')); return /^inline/.test(style.getPropertyValue('display')) || /^(left|right)$/.test(style.getPropertyValue('float'));
} }
export function getRectTarget(rect: Rect | null) { export function getRectTarget(rect: Rect | null) {