Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <body>
  2. <xx-button xx-draggable>
  3. <xx-button xx-draggable>
  4. <body>
  5.  
  6. <xx-button class="ng-isolate-scope ng-scope" draggable="true" hm-panstart="$draggableCtrl.ondragstart($event)" hm-panend="$draggableCtrl.ondragend($event)" hm-panmove="$draggableCtrl.ondrag($event)" style="-moz-user-select: none;">
  7. <button class="btn ng-binding" ng-click="$ctrl.onclick()">
  8. CLICK ME
  9. </button>
  10. </xx-button>
  11.  
  12. const subScope = '_' + Math.random() * 100000000000000000;
  13.  
  14. scope[subScope] = ctrl;
  15.  
  16. attr.$set('hm-panstart', subScope + '.ondragstart($event)');
  17. attr.$set('hm-panend', subScope + '.ondragend($event)');
  18. attr.$set('hm-panmove', subScope + '.ondrag($event)');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement