Comments (3)
Same problem without Vue, so its problem with indicating width of element, because in my case it nicely work with height, but dont want to drag with x axis, i found bad solution use limit object x: [0, x], y: [0, y], but then i can drag it out of container div. here some code to help:
let options = { limit: { x: [0, 870], y: [0, 403], }, limit: container, filterTarget: (e) => { if(e == dragg){ return true; }else{ return false; } }, onDragEnd: (drag, x, y) => { console.log('x=>',x,'y=>',y) } }
<div class="banners_image"> <div id="draggable"> <textarea></textarea> <div class="dragger"></div> </div> </div>
from draggable.
sorry! my bad! lookup at your code and findout what im do wrong) the problem was that im declare in css width of text area but not of dragable element, so dragable div was 100% width and there was 0 when you calculating scrollWidth and offsetWidth
from draggable.
@adi518 @gonardfreeman is this issue resolved? If not, @adi518 please post a complete repro case and I'll take a look.
from draggable.
Related Issues (20)
- Error with webpack when importing ES6 style HOT 8
- Handle element HOT 2
- Error occured while using the lib for server side rendering HOT 2
- Calling Draggable(element) raises an Error
- Draggable iframe HOT 1
- Textarea HOT 2
- onDrag "x" and "y" always are NaN HOT 2
- contenteditable="true" not working HOT 2
- Allow instances to handle more than one element HOT 3
- How to set default position for element? HOT 2
- How to use as drag and drop HOT 1
- how to using filterTarget prop HOT 2
- destroy ? HOT 1
- how can I save final draged draggable to svg ? HOT 1
- require syntax
- How to drag a sub-elements from draggable section
- Prevent click when dragging ?
- Content clicks don't register on mobile devices HOT 1
- "set" method to set the same location. The first set succeeds and the next set fails.
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 draggable.