Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Oct 30 2019 03:01
    erikbfeeley opened #183
  • Sep 14 2019 15:50
    malcolmocean commented #134
  • Sep 14 2019 15:50
    malcolmocean commented #134
  • Aug 10 2019 20:09
    Rho-n opened #182
  • Mar 21 2019 03:16
    Vnthf commented #180
  • Feb 02 2019 07:16
    sixfirst opened #181
  • Feb 02 2019 06:38
    sixfirst commented #81
  • Oct 20 2018 06:51
    666github666 opened #180
  • Aug 16 2018 07:33
    jazzymb7 opened #179
  • May 01 2018 08:42

    ganarajpr on 1.3.0


  • May 01 2018 08:41

    ganarajpr on master

    Don't eval on-drag-over, on-dra… Also avoid parsing uiOnDragOver… Merge pull request #177 from De… (compare)

  • May 01 2018 08:41
    ganarajpr closed #177
  • Mar 20 2018 16:25
    cladicovr commented #22
  • Mar 20 2018 16:17
    cladicovr commented #22
  • Nov 28 2017 05:37
    bhollis commented #177
  • Sep 22 2017 23:16
    leei commented #126
  • Sep 14 2017 19:30
    brittag opened #178
  • Jul 22 2017 02:07
    bhollis synchronize #177
  • Jul 21 2017 07:46
    bhollis opened #177
  • Jul 16 2017 06:50
    degs098 opened #176
Victorio Berra
This is neat
Ganaraj P R
Much better to answer questions here - relating to an open source project
Victorio Berra
Im new to this but this is good for an IRC like chatting experience, think freenode.net #javascript
Smaller projects like this I think benefit more for forum like chatting about issues in the issue area
Since someone can post, get emails on replys and come back and answer at their leisure
Tally Barak
Can you post an example of making the drag conditional. Could not get it working.
Victorio Berra
Tally can you post sample code on Plunkr?
Tally Barak
http://plnkr.co/edit/w7tiJQVxoPbYeRNcgFGO I would like to move only the labeled boxes. Also, if anyone has a tip for aligning the boxes, it will be great.
Victorio Berra
Im working on it now, and having trouble. I think I found a bug
@ganarajpr if you do ui-draggable="1 === 1" it will not allow the element to be draggable. It seems that you cant actually do an expression, just true or false. Also it would be nice if that could take a function too.
Victorio Berra
@Tallyb here you are: http://plnkr.co/edit/EIphpjgg5qB8jKO1UjXD?p=preview so I can see by your code that you are a little new to bootstrap, css, and angularJS so here are some pointers for the future. With bootstrap, make sure you have columns inside your rows. I added col-md-12 so devices of all sizes will have one large column. Always make sure your columns add up to 12. So you can do two divs in your row each with col-md-6. If youre having any types of lists of elements you should use a <ul> I use a <ul> with a bootstrap class called list-inline to make them all line up right, and then I added a special CSS attribute to the <li> elements called "vertical-align: top;" because if you add text to an element it will create a new baseline for that element since text is treated differently by browsers. ui-draggable takes a true or false, so that said, you can use angulars evaluate tags {{}} to have an expression eval. so I did {{label.name !== null}}. Good luck, and if you have any questions ill try to help some more. For basic angularJS questions you can check out the AngularJS Stackoverflow page, or you can find help in #angularjs in irc.freenode.net IRC chat.
Tally Barak
@LordWingZero first of all - thanks for the prompt response. You are right that I am new to bootstrap & angular, but at the same time, there was a reason for me not using columns (I was trying to imitate as close as possible what I am doing in my real app...). I found a nice solution for the alignment problem. Just adding: "white-space: pre;" does the trick. It was not clear form your documentation what type of syntax should be used in the evaluation of the draggable. Even in anguar they use different syntax. check for example the ng-class syntax for evaulting if a class is applicable. I will move forward with the example, and hope it will work.
Victorio Berra
@Tallyb I am not the dev of this project, I am just another user. But ive contributed here in the past via pull requests so im just here helping users out. ng-class has special properties that you wont find elsewhere. Take for example ng-hide/ng-show. ng-class lets you put in an object, and the objects key will be used if the value is true. so ng-class="{myClassName: 1===1}" will apply the class myClassName because 1 is equal to 1. You cant do that with most other angular properties. And if you take a look at ganarajpr's source code here, you can see that its only checking the value for true or false or the equivalent as shown here. So by using angulars expression syntax {{}} the compiler will compile and evaluate that before it even begins processing directives and whatnot. Therefore the value true or false is compiled here {{1 === 1}} and then sent to the directive if(neValue){ //newValue is true, or 1, ect.. }
Jason Kurian
@ganarajpr Is there an option to copy the object on drag?
so you can leave a "ghost" one behind, sort of like jquery draggable does?
Ganaraj P R
@JaKXz angular-dragdrop is data driven . The copy or move is totally dependent on what you do with the data itself
Dennis Yao
Has anyone else seen incompatibilities with angular 1.3? I'm currently seeing a module 'Failed to instantiate module ngDragDrop' error, but could swear it was working earlier.
Dennis Yao
Okay, figured it out - the module changed from "ngDragDrop" to "ang-drag-drop"
What would be really useful is support on touch devices like android/iOS
[sadly they still haven't gotten their act together with respect to html5 draganddrop due to conflicts over scrolling]
Victorio Berra
Drang and drop on mobile devices is difficult as it is.
Donal Byrne
Hi, it seems the link to the documentation is down (http://ganarajpr.github.io/angular-dragdrop/), are there any alternative docs?
I guess there's that test.html, that might be enough to get started..
Tim Ruffles
@jhogg41 you could use my shim -> https://github.com/timruffles/ios-html5-drag-drop-shim
it shims native drag'n'drop so should work well
Hannes Finck
Hi everyone, does this directive have 'self-drop' capabilities, e.g for reordering items within a list?
Victorio Berra
@hannesfinck its a drag and drop plugin, not a sortable plugin. Try https://github.com/angular-ui/ui-sortable
Michael Iglesias
Is there any way to clone the objects being dragged so that the item remains in its original list and appears in the list it was dropped into?
is there a way to style an image that is dragged?
Federico Bucchi
hi guys
anyone hanging out in here? I’m having a lot of trouble trying to get this to work :\