bwu-dart / bwu_datagrid

A data-grid Polymer element in Dart
MIT License
74 stars 26 forks source link

Changed usage of MouseEvent.which to MouseEvent.button #152

Closed andrey-zakharov closed 8 years ago

zoechi commented 8 years ago

Andrey, thanks a lot for the PR. Did you actually test this is working? When I made the change in the polymer1 branch, I discovered that the button numbers start with 0 instead of 1 (when button is used instead of `which´)

closes #151

andrey-zakharov commented 8 years ago

I've tested only resizing of columns. Always use named constants if its possible :) From reference:

The value of the button attribute MUST be as follows:

0 MUST indicate the primary button of the device (in general, the left button or the only button on single-button devices, used to activate a user interface control or select text) or the un-initialized value.

1 MUST indicate the auxiliary button (in general, the middle button, often combined with a mouse wheel).

2 MUST indicate the secondary button (in general, the right button, often used to display a context menu).

https://w3c.github.io/uievents/#interface-mouseevent

zoechi commented 8 years ago

Always use named constants if its possible :)

You are right of course.

zoechi commented 8 years ago

Merged and published an update.

zoechi commented 8 years ago

Thanks again for the PR :)