Comments (6)
I've had some success, but not there yet.
Some issues. I had to 'hack' polymer-dragula to find the template and add an event listener for dom-change, and only then add the container. I had to duplicate the style of the dragged item into the global style, including making it position: fixed, and some other adjustments. BTW, if I don't make it position: fixed, the positioning doesn't work and it is stuck at the top of the screen.
The issue that remains is that I am unable to 'drop'. When the item was not position: fixed, the drag item is at the top of the screen rather than under the cursor, then I can drop, but once it is positioned correctly, it isn't possible to drop it.
NB, if I add some 'tranform: translatex(-35px)', then it isn't under the cursor and I am able to drop the item.
Any ideas welcome.
from polymer-dragula.
I'm wondering, would turning off shadow DOM help here? Removing the <dom-module>
tag could really make sense here.
from polymer-dragula.
Sorry, I don't quite understand. Shadow dom is inherent to web components, as is dom-module. I guess I'm misunderstanding you...could you explain a bit more?
from polymer-dragula.
You can remove this line with <dom-module>
for your view controlling elements, then multiple elements should "see each other".
The more I work with polymer the more I see that for at least for "view elements" we should just create elements without shadow dom on. It solves some headaches related to styling, and cross component visibility.
from polymer-dragula.
Hi, do you have a demo showing how drag drop works on items created dynamically within a dom-repeat. Much appreciate your help on this.
from polymer-dragula.
it works for me in polymer 1.6 replacing <slot>
by <content>
Good job man !
sample
`
<polymer-dragula id="column-dragger" sub-container-selector=".col-holder" fn-moves="[[fnMovesInner]]">
<polymer-dragula id="row-dragger" fn-moves="[[fnMoves]]">
<div class="row-holder">
<template is="dom-repeat-n" count="{{depth}}">
<div class="vertical">
<div class="col-holder">
<template is="dom-repeat" items="{{computeGetChildren(index)}}">
<div class="card">
<strong class="handle-inner">drag handle</strong>
<p>[[item.name]]</p>
</div>
</template>
</div>
</div>
</template>
</div>
</polymer-dragula>
</polymer-dragula>
`
from polymer-dragula.
Related Issues (7)
- Dragula script tag needs to be wrapped in a link import to prevent duplication
- Support Shadow DOM correctly
- It doesn't work in the version of polymer#2.0.0 HOT 3
- Duplicated gu- styles in demo-elem necessary? HOT 2
- Demo showing how to translate drag events into data mutation? HOT 1
- Any plans on migrating to Polymer 2? 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 polymer-dragula.