Plugin to use interact.js with Aurelia http://interactjs.io/ Inspired by a blog post from Matthew James Davis http://davismj.me/blog/aurelia-drag-and-drop/
MIT License
13
stars
7
forks
source link
Adding interact-draggable etc attributes to dom element via the templatingEngine doesn't work as attached() isn't called #4
Operating System:
linux docker container on virtualbox on windows10
Node Version:
6.9.1
NPM Version:
3.10.8
JSPM OR Webpack AND Version
JSPM 0.16.48
Browser:
Chrome latest
Language:
TypeScript latest
Current behavior:
Adding the interact attributes to an existing dom element and calling templatingEngine.enhance() means that attached() isn't called and so the necessary interactjs code in the plugin isn't run.
Background:
I'm trying to implement row drag+drop behaviour in my app for the grid in the https://github.com/ceolter/ag-grid-aurelia project. It doesn't support it by default so I have to add a cell renderer in my gridWrapper component which looks like:
I have limited control over the grid itself, but after debugging this, and after a lot of trial and error, I can get it working if I move the code that is in interact-draggable.js from attached() to bind().
Expected/desired behavior:
As described above
What is the expected behavior?
As described above. I'm happy to create a PR for this. Please let me know if you are ok with it in theory.
What is the motivation / use case for changing the behavior?
More generic solution. I can't see any downsides to this, but happy to be corrected :-)
I'm submitting a bug report
Please tell us about your environment:
Operating System: linux docker container on virtualbox on windows10
Node Version: 6.9.1
NPM Version: 3.10.8
JSPM OR Webpack AND Version JSPM 0.16.48
Browser: Chrome latest
Language: TypeScript latest
Current behavior: Adding the interact attributes to an existing dom element and calling templatingEngine.enhance() means that attached() isn't called and so the necessary interactjs code in the plugin isn't run.
Background: I'm trying to implement row drag+drop behaviour in my app for the grid in the https://github.com/ceolter/ag-grid-aurelia project. It doesn't support it by default so I have to add a cell renderer in my gridWrapper component which looks like:
I have limited control over the grid itself, but after debugging this, and after a lot of trial and error, I can get it working if I move the code that is in interact-draggable.js from attached() to bind().
Expected/desired behavior: As described above
What is the expected behavior? As described above. I'm happy to create a PR for this. Please let me know if you are ok with it in theory.
What is the motivation / use case for changing the behavior? More generic solution. I can't see any downsides to this, but happy to be corrected :-)