Comments (8)
I think this is tricky because the mimetypes from the inner dockpanel match the accepted drops for the outer dockpanel. Perhaps there is a way to override those mimetypes for one or the other to make the inner and outer dockpanels incompatible with each other.
from lumino.
Yeah, this is the mimetype it is setting and accepting. If you customized that to be different for the inner and outer dockpanels, things might work:
lumino/packages/widgets/src/dockpanel.ts
Line 489 in 1beb8b3
lumino/packages/widgets/src/dockpanel.ts
Line 963 in 1beb8b3
from lumino.
Perhaps that string should be a class parameter that can be changed for these sorts of issues? It probably ought to be at least a variable so it can be referenced instead of typed out exactly three different places.
from lumino.
Yes that's a good point.
It should be possible to try a quick and dirty solution, for example by appending the DockPanel id
to the mime data, which would prevent drops to a widget with a different id.
Perhaps that string should be a class parameter that can be changed for these sorts of issues? It probably ought to be at least a variable so it can be referenced instead of typed out exactly three different places.
Or by adding the source
to the Drag
object here:
lumino/packages/widgets/src/dockpanel.ts
Lines 969 to 973 in 1beb8b3
And checking for the source here:
lumino/packages/widgets/src/dockpanel.ts
Line 489 in 1beb8b3
from lumino.
from lumino.
Thanks @afshin for the extra context.
Maybe such behavior could still be enabled using an opt-in flag, to let users do something like this if they really want to.
I'll experiment with this and report back, at least to get a feeling of what it looks like in terms of UX.
from lumino.
This functionality might be useful for e.g. variable viewers for the debugger
(though I'm not sure that is an actual improvement over just adding them to the main DockPanel)
from lumino.
Reusing the example from above, and implementing the idea from #43 (comment) and using the source
field from the Drag
object:
from lumino.
Related Issues (20)
- MenuBar example is currently broken HOT 5
- Conditional Lumino plugin load HOT 3
- Focus tracker does not focus on tab item HOT 2
- Karma is deprecated we should move on HOT 4
- Auto tab activation
- Tab title edition in Firefox has bugs
- `Tab` and `Shift+Tab` are moving the focus in strange way in `DockPanel`
- Automate link to ReadTheDocs PR preview
- How to persistence SplitPanel and DockPanel? HOT 3
- DockPanel drag & drop HOT 1
- SplitPanel has 0 width and height HOT 8
- How DockPanel set relative sizes?
- Support the selectors with `:is()` and `:where()`
- Menu item not clickable on mobile device unless doing in a quite strange way HOT 2
- New keybinding attribute to indicate shortcuts which prevent default actions HOT 2
- Publishing v2024.3.25 release to NPM failed HOT 1
- Refactor the plugins handling out of the `Application` HOT 5
- copy-paste functionality in an editable DataGrid HOT 2
- Support host and ref options in Menu.open HOT 2
- `Menu.open()` should have an option to align `x` and `y` to the top right of the menu. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lumino.