Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/editor-skeleton/src/layouts/left-float-pane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { observer, Focusable } from '@alilc/lowcode-editor-core';
import { Area } from '../area';
import { Panel } from '../widget/panel';
import { PanelConfig } from '../types';
import { IPublicApiProject } from '@alilc/lowcode-types';

@observer
export default class LeftFloatPane extends Component<{ area: Area<PanelConfig, Panel> }> {
Expand Down Expand Up @@ -31,6 +32,8 @@ export default class LeftFloatPane extends Component<{ area: Area<PanelConfig, P
area.skeleton.editor.removeListener('designer.drag', triggerClose);
};

const project: IPublicApiProject | undefined = area.skeleton.editor.get('project');

this.focusing = area.skeleton.focusTracker.create({
range: (e) => {
const target = e.target as HTMLElement;
Expand All @@ -44,6 +47,9 @@ export default class LeftFloatPane extends Component<{ area: Area<PanelConfig, P
if ((document.querySelector('.lc-simulator-content-frame') as HTMLIFrameElement)?.contentWindow?.document.documentElement.contains(target)) {
return false;
}
if (project?.simulatorHost?.contentWindow?.document.documentElement.contains(target)) {
return false;
}
// 点击设置区
if (document.querySelector('.lc-right-area')?.contains(target)) {
return false;
Expand Down
6 changes: 6 additions & 0 deletions packages/workspace/src/layouts/left-float-pane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Component, Fragment } from 'react';
import classNames from 'classnames';
import { observer, Focusable } from '@alilc/lowcode-editor-core';
import { Area, Panel } from '@alilc/lowcode-editor-skeleton';
import { IPublicApiProject } from '@alilc/lowcode-types';

@observer
export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }> {
Expand Down Expand Up @@ -29,6 +30,8 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
area.skeleton.editor.removeListener('designer.drag', triggerClose);
};

const project: IPublicApiProject | undefined = area.skeleton.editor.get('project');

this.focusing = area.skeleton.focusTracker.create({
range: (e) => {
const target = e.target as HTMLElement;
Expand All @@ -42,6 +45,9 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
if ((document.querySelector('.lc-simulator-content-frame') as HTMLIFrameElement)?.contentWindow?.document.documentElement.contains(target)) {
return false;
}
if (project?.simulatorHost?.contentWindow?.document.documentElement.contains(target)) {
return false;
}
// 点击设置区
if (document.querySelector('.lc-right-area')?.contains(target)) {
return false;
Expand Down