Tuch / angular-dnd

Drag and Drop module for Super heroic 1.x AngularJS. Not jQueryUI. Touch supporting.
67 stars 25 forks source link

Каких возможностей не хватает / что реализовано плохо #13

Open Tuch opened 9 years ago

Tuch commented 9 years ago

Прошу сюда писать пожелания, что бы знать, что улучшать в первую очередь

romanesko commented 9 years ago

В примере с лассо - лассо позволяет выделить несколько объектов, но перетаскивать все выделенные - нет.

0pt1m1z3r commented 9 years ago

Здравствуйте. Прекрасный модуль! Обнаружил пару недочетов:

  1. При использовании dnd-draggable-opts="{helper:'clone'}" у перемещаемого объекта нет смещения отноительно точки где мы его захватили. Позже в пулреквесте предложу свой вариант исправления.
  2. На touch девайсах нужен небольшой delay чтобы мы могли скролить страницу/список если попали пальцем в dnd объект.
Tuch commented 9 years ago

Первый пункт сейчас в работе, насчет второго - хорошая идея, буду рад помощи, т.к. сейчас очень мало времени

С Уважением,  Афонин А.В.

On Apr 15, 2015, at 1:58 PM, Dmitriy Efimenko notifications@github.com wrote:

Здравствуйте. Прекрасный модуль! Обнаружил пару недочетов:

  1. При использованииdnd-draggable-opts="{helper:'clone'}" у перемещаемого объекта нет смещения отноительно точки где мы его захватили. Позже в пулреквесте предложу свой вариант исправления.
  2. На touch девайсах нужен небольшой delay чтобы мы могли скролить страницу/список если попали пальцем в dnd объект.

— Reply to this email directly orview it on GitHub .

sanyam-j commented 9 years ago

Как ограничить максимальный размер conatiner сторону при изменении размера ?

Tuch commented 9 years ago

you can use something like dnd-on-resizeend = "ctrl.dragend()" dnd-rect = "ctrl.rect", where ctrl is:

function Ctrl () {
    this.rect = {top: 100, left: 100, width: 100, height: 100}

    var maxWidth = 300;
    this.dragend = function () {
       if (parseInt(this.rect.width) > maxWidth) this.rect.width = maxWidth;
    }
}
sanyam-j commented 9 years ago

Hi,

I am using your first demo of dragging, re-sizing and rotating. While dragging its working fine by not dragging element outside the container. But while re-sizing, for exp my container is of 500px and my re-sizable element is of 50px originally and is placed in center of the container and also i have given it the maxWidth 500px, so while i re-sizing it to right, it get re-sized to 500px and go out of the container. So what i need is while re-sizing, the element can't be re-sized more than its container.

Secondly, i want to edit the text written in element?

I am stuck because of it for 2 3 days. Please help.

Thanks !!!

Tuch commented 9 years ago

This was a bag. You can use new version (0.1.11) where this bag was fixed. Also in new version added a new dnd-containment = "parent selector" directive instead dnd-container and restrictTheMovement option. Please look demo sources

sanyam-j commented 9 years ago

@Tuch Thanks !!! The only thing left for me is to edit the text using any editor on the fly. While i am using the textangular, its toolbar is not focusing properly.

sanyam-j commented 9 years ago

Rotation & Re-sizing is not working good in touch devices. Do i need to set some variable for it?

Tuch commented 9 years ago

Very strange. I just tested demo in http://tuch.github.io/angular-dnd/latest/demo/ link in my ios simulator ipad and it works fine..

sanyam-j commented 9 years ago

@Tuch I am using it in nexus 5 chrome. Its getting difficult to rotate and re-size. Not an issue, i think screen is small so touching the exact point is getting difficult.

I am trying to add textangular text editor inside the element. Its not working and can you help?

Tuch commented 9 years ago

can you show jsfiddle?

sanyam-j commented 9 years ago

@Tuch I have deployed test application at http://intense-wildwood-2005.herokuapp.com/ . And the repo is https://github.com/sanyam-j/test_application. Its not working properly. Can you help me out?

Tuch commented 9 years ago

check this example http://plnkr.co/edit/3tYZav1CTffeITYJityr?p=preview. It what you need?

sanyam-j commented 9 years ago

@Tuch Yes i want this only. But when i go this with newer version of angular, it throws the following execption https://docs.angularjs.org/error/$compile/multidir?0=dndDraggable&p1=textAngular&p2=new

Tuch commented 9 years ago

try this my friend http://plnkr.co/edit/3tYZav1CTffeITYJityr?p=preview This error meant that more than one directive requires its own scope (scope: true in directive definition)

sanyam-j commented 9 years ago

@Tuch Yes i am doing this way only. But the problem with this is that when i am decreasing the size of element, its not decreasing the size of inner textangular div and making it float over it

Tuch commented 9 years ago

oh, i mind u must do some magic with css..

sanyam-j commented 9 years ago

@Tuch Hi. I have done lot of things with css and its working. Thanks. One last issue i am facing is when add dragging to element, its not possible to select the text inside that div. As i found, that it disable the select over that div. Can you help me out on it. it will be great help.

Tuch commented 9 years ago

try use this https://github.com/Tuch/angular-dnd#dnd-pointer-none option

sanyam-j commented 9 years ago

@Tuch Thanks buddy. Its works for me. I am tried this earlier but forget it. Really Thanks !!

sanyam-j commented 9 years ago

@Tuch Hi, when i have some more html element inside the editable div, which i am using as input and have dnd-pointer-none. The dnd-pointer-none doesn't work on inner elements because it is on the parent div and not on the child elements. Can you help me out?

Tuch commented 9 years ago

can u show jsfiddle example?

sanyam-j commented 9 years ago

@Tuch Here's the example for what i am saying. You can see that my model variable has html in it, so when i place dnd-pointer-none on parent and if it has child elements, then dnd-pointer-none does't work.

http://plnkr.co/edit/jcnUD5oS0kdP0rp1Lw1s?p=preview

Secondly, can you make a release for the version, it will be easy to point to the release while fetching the branch.

Tuch commented 9 years ago

@sanyam-j try new 0.1.12 version. I fix it

sanyam-j commented 9 years ago

@Tuch Thanks !!

Carw commented 9 years ago

Можно ли сделать многоуровневое дерево?

Tuch commented 9 years ago

вы имеете ввиду вложенные dnd элементы? что-то вроде этого http://plnkr.co/edit/lzqN3VmEblAr700M1bUS?p=preview

wegorich commented 9 years ago

Не хватает примера или описания css классов

mfyodorov commented 8 years ago

В директиве dndSortable когда формируется объект настроек dnd-draggable-opts параметр handle задается как handle: opts.handle, но opts.handle - строка и может быть селектором с точкой вначале, и в итоге получается невалидное значение, когда данный объект записывается в атрибут элемента. Это вызывает ошибку. Нужно поправить на handle: "'"+opts.handle+"'"

tarankov88 commented 7 years ago

Не хватает мульти D&D, например когда мы через лассо выделяем группу элементов, они получают статус "выделенные", хотелось бы при перетаскивании перемещать сразу все выделенные элементы, как минимум опционально. Благодарю!