compareMouseAction method

dynamic compareMouseAction(
  1. dynamic action1,
  2. dynamic action2
)

Compare two mouse actions @param {Object} action1 @param {Object} action2 @returns {Boolean} True if action1 and action 2 are the same mouse action, false otherwise

Implementation

compareMouseAction(action1, action2) {
  if (action1['operation'] == action2['operation']) {
    if (action1['mouse'] == action2['mouse'] && action1['key'] == action2['key']) {
      return true;
    } else {
      return false;
    }
  } else {
    return false;
  }
}