jtrussell / angular-snap.js

AngularJS directive for snap.js
http://jtrussell.github.io/angular-snap.js/
MIT License
700 stars 67 forks source link

snap drag causing issue with ng Grid drag for Grouping functionality #83

Closed madasuk closed 9 years ago

madasuk commented 9 years ago

Hi, Is there any possibility to disable the drag feature in angular snap. Because in ng Grid, I need to drag column header for grouping functionality (This ng Grid is inside snap content) but when I do it, snap drawer is opening in up, instead firing ng grid grouping functionality. Then onwards if I click snap toggle button in snap drawer, snap content is opening and closing instead snap drawer. And snap-drawer is never getting closed since then. If I can fully disable drag behavior in angular snap, I think this issue will be resolved. Could you please tell me how can I do it?

jtrussell commented 9 years ago

If you want to disabled dragging completely you can do it with the snapRemoteProvider:

angular.module('myModule').config(function(snapRemoteProvider) {
  snapRemoteProvider.globalOptions.touchToDrag = false;
});

You should also be able to disable dragging on certain elements:

<div data-snap-ignore>
  <!--
    Put ng-grid here, dragging here should not open the drawer
  -->
</div>
jtrussell commented 9 years ago

Closing this for now - let me know if you have other questions!