BTMorton / angular2-grid

A drag/drop/resize grid-based plugin directive for angular2
https://bmorton.co.uk/angular/
MIT License
354 stars 159 forks source link

How can I get target element onResizeStop? #271

Closed zvoboter closed 6 years ago

zvoboter commented 6 years ago

I want to get the element (div) that is resizing. Is there a way to get this?

BTMorton commented 6 years ago

Since the grid doesn't actually create or maintain the elements, it doesn't give you access to the element in it's callbacks, as you should already have access to them. A couple of ways to identify which element is changing are a) use a payload to identify each item or b) include a reference to the element in the event callback. That should allow you to identify each item and then you can find the corresponding element from there. If they don't make sense, I'm happy to elaborate further.

zvoboter commented 6 years ago

Thanks for the answer. I got the element using the payload to identify itens.