Comments (8)
I've recognized this issue. Dragging definitely needs fine-tuning. I'll make sure to incude patch for it in the next release, however, please provide me enough information to reproduce the problem as there can be many possible causes to this unwanted behaviour.
from domenu.
Noted. Will try to specify more details in the future.
Is there a way to block a particular dd-item from having a "working" content (title) edit?
When domenu kicks in I launch a function that spreads classes based on the domenu json, my json is custom
data: '[{"title":"Account","type":"service"},{"title":"Settings","type":"category"}]'
I was wondering if It's possible to set these custom attributes to json when I create an item?
from domenu.
Utilize onCreateItem
event and the jQuery data
method.
...domenu().onCreateItem(function($item) {
$item.data($.extend(true, $item.data(), {customAttr: "custom value"}));
});
doMenu uses $item.data()
of each item to serialize it to JSON.
from domenu.
It would be a nice enhancement if you'd be able to visually see when you're not allowed to drag under an element (when maxdepth is reached), like here for example.
Are there going to be "shortcut" functions in the future? Like getParent()
of an element etc.?
Currently trying to achieve a block for element, similar to maxdepth behavior, but not sure if it's possible yet in this solution.
I need to to utilize onItemDrag
so when I try to put an element under some other (the other element is parent) and if that element has my "special" attribute, then I can't put it there. Had no success achieving that, does the script understand which item is parent while in onItemDrag
state or does it understand that only in onItemDrop
state?
from domenu.
There will be an separate API for items included in the next release which will feature methods alike.
Try to establish the parent using the corresponding placeholder as specified by the placeClass
option.
from domenu.
placeClass
can do the job, but in order to utilize it I need an event, something like onItemMove
which would kick in from dragMove
, so it would track everything that's happening with the item that is dragged. Well, necessity of utilizing placeClass
disappears because in this case it would be simpler to do something like getParent()
because script is setting the parent in dragMove
.
It would be great to have some output varieties for the flexibility of the plugin, like toArray, toHierarchy etc (idea from nestedSortable, looks handy).
I though nestable dragging was done well enough, why did you decide to tune it? Any approx. date when new release is coming?
from domenu.
@s0By Check out 0.99.77-rc1 it improves dragging and introduces the placeholder max-depth state.
from domenu.
@s0By can you please tell me how to do this?
I don't want to allow parent be child of another parent. But yes it should be allowed to drag as need to allow sorting.
from domenu.
Related Issues (20)
- Loading data using get_file_contents throws Uncaught SyntaxError: Unexpected token o HOT 5
- Additional functionality HOT 1
- prevent post inside form HOT 2
- Rewrite to Babel HOT 2
- after received json how to save data in database if child leave is more than 5-10 HOT 1
- how to find my json id HOT 4
- onItemRemoved function HOT 2
- Select2 dropdown selection selects option text instead of option value. HOT 2
- Cannot handle escape strings HOT 3
- your's domenu Nestable plugin is very useful for me thank you for this stuff. HOT 1
- Can we have different colors to elements? HOT 1
- I dont want to allow parent be child of anothe parent HOT 3
- doMenu in Form element not working HOT 2
- item-remove only needed at end child level HOT 1
- D in menu FIX HOT 2
- doMenu value of title and id field HOT 1
- how to display id along with title of one doMenu at other doMenu? HOT 1
- How can I call createNewListItem with parameters from outside domenu() plugin?
- property assigned to Menu item HOT 3
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 domenu.