8000 Way to disable overlay on drag source · Issue #953 · mathuo/dockview · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Way to disable overlay on drag source #953
Open
@KompocikDot

Description

@KompocikDot

Hi,

First of all, thanks a lot for this library, it made my work (and life) a lot easier 😃

Is there any builtin way to disable displaying overlay on dnd source? I'm looking at scenario shown in the picture below.

So when there is only in panel in group - lets say A - overlay won't be displayed over it on drag start and it will appear only when we leave it's area or we drop it at the edge of the screen?

I was able to make a temporary solution like:

dock.onWillShowOverlay((e) => {
    if (e.kind === 'edge') return;
    if (
      e.getData()?.panelId == e.options.panel.id &&
      e.options.group._model._panels.length === 1
    ) {
      e.preventDefault();
    }
  });

The problem is, that options property is private. Is there a better way to achieve this or is it possible to make options public?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0