mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fix : drawing with the right mouse button (FF, IE)
Mousemove events do not have the correct button information Need to keep the state of which button is clicked at which moment This was actually the initial implementation ... But I removed it because I couldn't remember why we did this in the beginning. Added lots of 'warnings' in comments, but won't be safe until we get good integration tests. References : - FF : https://bugzilla.mozilla.org/show_bug.cgi?id=297919 "What if multiple buttons are pressed during mouse move? And how does the integer field (button) indicate that no button is pressed? I think this should be wontfix -- if people need button information during mouse move events we need a new way of getting it (buttonSet), not the same way it works for click, etc." - IE : couldn't find any reference ...
This commit is contained in:
@ -98,7 +98,14 @@
|
||||
|
||||
ns.PalettesListController.prototype.onColorUpdated = function (type, event, color) {
|
||||
console.log('[PalettesListController] >>> ', arguments);
|
||||
|
||||
var colorContainer = this.colorListContainer_.querySelector('.palettes-list-color[data-color="'+color+'"]');
|
||||
|
||||
// Color is not in the currently selected palette
|
||||
if (!colorContainer) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (type === 'primary') {
|
||||
this.removeClass_('primary', '.palettes-list-color');
|
||||
colorContainer.classList.add('primary');
|
||||
|
Reference in New Issue
Block a user