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;
z-index: 12;
pointer-events: none !important;
background-color: var(--color-brand-light);
height: 3px;
background-color: white;
height: 5px;
border: 2px solid var(--color-brand-light);
border-radius: 2px;
&.cover {
top: 0;
height: auto;
width: auto;
background-color: var(--color-brand-light);
border: none;
opacity: 0.3;
border-radius: 0;
}
&.vertical {
top: 0;
left: -1.5px;
width: 3px;
width: 5px;
height: auto;
}
&.invalid {

View File

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

View File

@ -86,7 +86,7 @@ export function isChildInline(child: Element | Text, win?: Window) {
return true;
}
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) {