m-e-conroy / angular-dialog-service

A complete AngularJS service with controllers and templates for generating application modals and dialogs for use with Angular-UI-Bootstrap and Twitter Bootstrap
MIT License
618 stars 228 forks source link

how can I make the dialog draggable? #153

Open firecentaur opened 8 years ago

firecentaur commented 8 years ago

Hi there, I would like for the user to be able to drag / move the dialog around the screen. How can I do this?

wcomartin commented 8 years ago

I created a directive attached the dialogs class, which just adds the draggable jq handler.

.directive('modalDialog', function(){
  return {
    restrict: "C",
    link: function(scope, element, attrs){
      element.draggable({
        handle: ".modal-header"
      })
    }
  };
});
sjuranek commented 8 years ago

Thank you William!

introspection3 commented 7 years ago

@wcomartin where is jq handler

introspection3 commented 7 years ago

@sjuranek where is jq handler thanks

introspection3 commented 7 years ago

hello

wcomartin commented 7 years ago

sorry about the delayed response, but its part of JqueryUI https://jqueryui.com/draggable/