How to listen to tiles event top, left right or bottom click?

Get help with using Metro 4 components
Post Reply
gsubiran
Posts: 2
Joined: Tue Aug 27, 2019 2:53 pm
Status: Offline

How to listen to tiles event top, left right or bottom click?

Post by gsubiran » Tue Aug 27, 2019 3:03 pm

I'm playing a bit with metroui and it's great. Now I'm a bit confused about events support for controls. I cant get working top, left right or bottom click for tiles. Anyone have any idea about the correct way to do that?
Now I'm playing with metroui and vuejs but this question is no js framework dependant.

Thanks!

gsubiran
Posts: 2
Joined: Tue Aug 27, 2019 2:53 pm
Status: Offline

Post by gsubiran » Tue Aug 27, 2019 3:32 pm

Ok It was easier than expected. Just binding click event to the tile it's possible to get it working. Inside event object you get an object with info about bottom, top, right or left click.

function tileClickFunction(evt){
console.log("Tile clicked at: " + evt.detail.side);
}

User avatar
olton
Site Admin
Posts: 232
Joined: Mon Apr 09, 2018 6:19 pm
Location: Kiev, Ukraine
Status: Offline

Post by olton » Tue Aug 27, 2019 4:00 pm

I am currently working on metro 4 for react, and therefore do not make changes to metro 4 unless this is a bug fix. You can leave issue on the github project page and I will probably add this extension later

Post Reply